diff options
author | Thomas White <taw@physics.org> | 2023-11-09 11:59:51 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2024-02-06 16:59:34 +0100 |
commit | dfdb8e50c49f7199ab43f5e92dcd16251055e4a0 (patch) | |
tree | 5edeef886cdd28b8dcf1c300391545c17d0b4810 /julia/CrystFEL | |
parent | d482752291dce86107bf97cda0e163db6fcc7b70 (diff) |
Julia: display methods for RefList{UnmergedReflection}
Diffstat (limited to 'julia/CrystFEL')
-rw-r--r-- | julia/CrystFEL/src/reflists.jl | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/julia/CrystFEL/src/reflists.jl b/julia/CrystFEL/src/reflists.jl index 362b53db..9f8b7262 100644 --- a/julia/CrystFEL/src/reflists.jl +++ b/julia/CrystFEL/src/reflists.jl @@ -134,17 +134,20 @@ end function Base.show(io::IO, ::MIME"text/plain", reflist::RefList{UnmergedReflection}) println(io, "Unmerged reflection list in point group ", symmetry_name(reflist.symmetry)) - print(io, " h k l intensity") + print(io, " h k l intensity σ(intens) fs ss panel") let n = 0 for refl in Iterators.take(reflist, 11) if n == 10 # We have printed 10 already, and are here again. Truncate... - print(io, "\n ⋮ ⋮ ⋮ ⋮") + print(io, "\n ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮") break end - let ind = refl.indices + let ind = refl.indices, + pos = refl.detectorposition write(io, "\n") - @printf(io, "%4i %4i %4i %10.2f", ind[1], ind[2], ind[3], refl.intensity) + @printf(io, "%4i %4i %4i %10.2f %10.2f %7.2f %7.2f %6i", + ind[1], ind[2], ind[3], refl.intensity, refl.sigintensity, + pos.fs, pos.ss, pos.panelnumber) n += 1 end end @@ -276,4 +279,18 @@ function Base.show(io::IO, refl::MergedReflection) write(io, ")") end + +function Base.show(io::IO, refl::UnmergedReflection) + write(io, "UnmergedReflection(") + show(io, refl.indices) + write(io, " at "); + show(io, refl.detectorposition) + write(io, ", intensity=") + show(io, refl.intensity) + write(io, ", σ(intensity)=") + show(io, refl.sigintensity) + write(io, ")") +end + + end # of module |