Task #7897 (closed)
Opened 12 years ago
Closed 12 years ago
Bug: liff Detector Offset
Reported by: | wmoore | Owned by: | wmoore |
---|---|---|---|
Priority: | major | Milestone: | OMERO-4.4 |
Component: | Bio-Formats | Version: | n.a. |
Keywords: | n.a. | Cc: | |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | 2012-03-27 (11) |
Description
E.g. Rosier.liff Fluo exo/Image007
Currently we are reading:
<Channel Color="255" ExcitationWavelength="405" ID="Channel:0:0" Name="Leica/DAPI" PinholeSize="67.9634142508981" SamplesPerPixel="1"> <DetectorSettings Gain="1065.67101548791" ID="Detector:0:0" Offset="-4.35333333333334"/> <Channel Color="65280" ExcitationWavelength="488" ID="Channel:0:1" Name="Leica/FITC" PinholeSize="67.9634142508981" SamplesPerPixel="1"> <DetectorSettings Gain="819.771877622644" ID="Detector:0:1" Offset="-7.81999999999999"/> <Channel Color="16777215" ID="Channel:0:2" Name="" PinholeSize="67.9634142508981" SamplesPerPixel="1"> <DetectorSettings Gain="331.960021362631" ID="Detector:0:2" Offset="-65.1066666666667"/> <Channel Color="16711680" ExcitationWavelength="561" ID="Channel:0:3" Name="Leica/TRITC" PinholeSize="67.9634142508981" SamplesPerPixel="1"> <DetectorSettings Gain="1177.92019531548" ID="Detector:0:3" Offset="-4.35333333333334"/> <Channel Color="16711935" ExcitationWavelength="633" ID="Channel:0:4" Name="Leica/Cy5" PinholeSize="67.9634142508981" SamplesPerPixel="1"> <DetectorSettings Gain="823.434042877852" ID="Detector:0:4" Offset="-5.09999999999999"/>
The values displayed in the PFF metadata are:
PMT 1 (406nm - 479nm) Active, Gain: 1066, Offset: -65 PMT 2 (490nm - 564nm) Active, Gain: 820, Offset: -4 Transmission Active, Gain: 332, Offset: -5 PMT 3 (565nm - 642nm) Active, Gain: 1178, Offset: -40 PMT 4 (642nm - 798nm) Active, Gain: 823, Offset: -10
The data come from the Active detector(s) in each different Detector List (same as Gain, which IS being read correctly)
<DetectorList> <Detector Channel="1" IsActive="1" IsReferenceUnitActivatedForCorrection="0" Gain="1065.67101548791" Offset="-65.1066666666667" Type="PMT 1" OffsetShow="-65" GainShow="1066" ActiveShow="Active" Band="(406nm - 479nm)" LutName="Blue" /> .... <DetectorList> .... <Detector Channel="2" IsActive="1" IsReferenceUnitActivatedForCorrection="0" Gain="819.771877622644" Offset="-4.35333333333334" Type="PMT 2" OffsetShow="-4" GainShow="820" ActiveShow="Active" Band="(490nm - 564nm)" LutName="Green" /> .... <Detector Channel="100" IsActive="1" IsReferenceUnitActivatedForCorrection="0" Gain="331.960021362631" Offset="-5.09999999999999" Type="Transmission" OffsetShow="-5" GainShow="332" ActiveShow="Active" Band="" LutName="Gray" /> <DetectorList> .... <Detector Channel="3" IsActive="1" IsReferenceUnitActivatedForCorrection="0" Gain="1177.92019531548" Offset="-39.5533333333333" Type="PMT 3" OffsetShow="-40" GainShow="1178" ActiveShow="Active" Band="(565nm - 642nm)" LutName="Red" /> <DetectorList> .... <Detector Channel="4" IsActive="1" IsReferenceUnitActivatedForCorrection="0" Gain="823.434042877852" Offset="-10.24" Type="PMT 4" OffsetShow="-10" GainShow="823" ActiveShow="Active" Band="(642nm - 798nm)" LutName="Magenta" />
Change History (13)
comment:1 Changed 12 years ago by mlinkert
- Sprint set to 2012-02-14 (8)
comment:2 Changed 12 years ago by mlinkert
- Owner changed from mlinkert-x to wmoore
comment:3 Changed 12 years ago by wmoore
- Status changed from new to accepted
comment:4 Changed 12 years ago by wmoore
- Owner changed from wmoore to mlinkert-x
Hi Melissa
Fluo exo/Image007 is looking good. Unfortunately, when I also checked Series005 in the same file, the offsets and gains are not right.
Series005 LIF metadata displays as
PMT 1 (406nm - 479nm) Active, Gain: 1069, Offset: -69 PMT 2 (490nm - 564nm) Active, Gain: 820, Offset: -4 Transmission Active, Gain: 332, Offset: -5 PMT 3 (565nm - 642nm) Active, Gain: 1178, Offset: -40 PMT 4 (642nm - 798nm) Active, Gain: 823, Offset: -10
We are currently reading
<DetectorSettings Gain="1068.64652475776" ID="Detector:2:0" Offset="-68.54"/> <DetectorSettings Gain="994.277866788739" ID="Detector:2:1" Offset="-2.84666666666666"/> <DetectorSettings Gain="901.40764476997" ID="Detector:2:2" Offset="-13.1266666666667"/> <DetectorSettings Gain="773.422598611429" ID="Detector:2:3" Offset="-10.24"/> <DetectorSettings Gain="1068.64652475776" ID="Detector:2:4" Offset="-68.54"/>
The data we want is in (not showing Channels where IsActive="0")
<ATLConfocalSettingDefinition> <DetectorList> <Detector Channel="1" IsActive="1" Gain="1068.64652475776" Offset="-68.54" Type="PMT 1" OffsetShow="-69" GainShow="1069" ... /> ... more Detectors with IsActive="0" ... </DetectorList> </ATLConfocalSettingDefinition> ... <ATLConfocalSettingDefinition> <DetectorList> ... <Detector Channel="2" IsActive="1" Gain="819.771877622644" Offset="-4.35333333333334" Type="PMT 2" OffsetShow="-4" GainShow="820" ... /> ... <Detector Channel="100" IsActive="1" Gain="331.960021362631" Offset="-5.09999999999999" Type="Transmission" OffsetShow="-5" GainShow="332" ... /> ... </DetectorList> </ATLConfocalSettingDefinition> ... <ATLConfocalSettingDefinition> <DetectorList> ... <Detector Channel="3" IsActive="1" Gain="1177.92019531548" Offset="-39.5533333333333" Type="PMT 3" OffsetShow="-40" GainShow="1178" ... /> ... </DetectorList> </ATLConfocalSettingDefinition> ... <ATLConfocalSettingDefinition> <DetectorList> ... <Detector Channel="4" IsActive="1" Gain="823.434042877852" Offset="-10.24" Type="PMT 4" OffsetShow="-10" GainShow="823" ... /> ... </DetectorList> </ATLConfocalSettingDefinition>
comment:5 Changed 12 years ago by jburel
- Sprint changed from 2012-02-14 (8) to 2012-02-28 (9)
Moved from sprint 2012-02-14 (8)
comment:6 Changed 12 years ago by mlinkert
- Owner changed from mlinkert-x to wmoore
Should be sorted out with: https://github.com/melissalinkert/bioformats/commit/b10e9676bfff66945c46b1ba6efe7257d360528d
I tested against the OME-XML in metadata.git, and both the gains and offsets appear to be correct. Passing back for final testing.
comment:7 Changed 12 years ago by jburel
- Sprint changed from 2012-02-28 (9) to 2012-03-13 (10)
Moved from sprint 2012-02-28 (9)
comment:8 Changed 12 years ago by wmoore
- Owner changed from wmoore to mlinkert-x
Looking at Martins "sample files.lif", things are looking better but there are several images with wrong Gain and Offsets.
This is using BF sprint10-bug-fixes with sprint8-bug-fixes merged in.
Doing
$ java -Xmx512m loci.formats.tools.ImageInfo -nopix -omexml-only -no-sas -xmlspaces 4 /Users/will/Documents/biology-data/Test-Import-Images/Martin/Leica-SP5/sample\ files.lif
and comparing the output to what's in omexml_repo branch under components/specification/Samples/Repository/MetadataOnly/Leica_LIF/sample_files.ome.xml
In the diff below, "+" is what BF branch is writing now, "-" is the correct value, as in omexml_repo.
<Image ID="Image:4" Name="series 03 - XZChRefl"> ... <Channel Color="-16776961" ExcitationWavelength="405" ID="Channel:4:0" Name="" PinholeSize="106.08964270380099" SamplesPerPixel="1"> <LightSourceSettings Attenuation="0.7999756" ID="LightSource:4:0"/> - <DetectorSettings Gain="362.058442053864" ID="Detector:4:0" Offset="0"/> + <DetectorSettings Gain="355.477988860914" ID="Detector:4:0" Offset="-1.5"/> </Channel> <Channel Color="-16776961" ExcitationWavelength="633" ID="Channel:4:1" Name="" PinholeSize="106.08964270380099" SamplesPerPixel="1"> <LightSourceSettings Attenuation="0.5599707" ID="LightSource:4:7"/> - <DetectorSettings Gain="402.265964751659" ID="Detector:4:1" Offset="0"/> + <DetectorSettings Gain="315.251392385748" ID="Detector:4:1" Offset="1.18000000000001"/> </Channel>
<Image ID="Image:9" Name="image 02 - XYCh-20x"> <Channel Color="65535" ExcitationWavelength="405" ID="Channel:9:0" Name="" PinholeSize="600.000028498471" SamplesPerPixel="1"> </Channel> <Channel Color="16711935" ExcitationWavelength="488" ID="Channel:9:1" Name="" PinholeSize="600.000028498471" SamplesPerPixel="1"> <LightSourceSettings Attenuation="0.7999756" ID="LightSource:9:3"/> - <DetectorSettings Gain="434.634164950027" ID="Detector:9:1" Offset="-1.48666666666666"/> + <DetectorSettings Gain="407.434958419165" ID="Detector:9:1" Offset="0.38666666666667"/> </Channel> <Channel Color="-16711681" ExcitationWavelength="543" ID="Channel:9:2" Name="" PinholeSize="600.000028498471" SamplesPerPixel="1"> <LightSourceSettings Attenuation="0.6999939" ID="LightSource:9:6"/> - <DetectorSettings Gain="535.915922789349" ID="Detector:9:2" Offset="-0.546666666666667"/> + <DetectorSettings Gain="434.634164950027" ID="Detector:9:2" Offset="-1.48666666666666"/> </Channel> <Channel Color="-16776961" ExcitationWavelength="633" ID="Channel:9:3" Name="" PinholeSize="600.000028498471" SamplesPerPixel="1"> <LightSourceSettings Attenuation="0.6999939" ID="LightSource:9:7"/> - <DetectorSettings Gain="556.496528572519" ID="Detector:9:3" Offset="-0.233333333333334"/> + <DetectorSettings Gain="535.915922789349" ID="Detector:9:3" Offset="-0.546666666666667"/> </Channel>
<Image ID="Image:11" Name="image 04 - XYCh-40x rot"> ... <Channel Color="65535" ExcitationWavelength="405" ID="Channel:11:0" Name="" PinholeSize="600.000028498471" SamplesPerPixel="1"> <LightSourceSettings Attenuation="0.7999756" ID="LightSource:11:0"/> - <DetectorSettings Gain="541.275654230564" ID="Detector:11:0" Offset="0.38666666666667"/> + <DetectorSettings Gain="444.743266956588" ID="Detector:11:0" Offset="-0.546666666666667"/> </Channel> <Channel Color="16711935" ExcitationWavelength="488" ID="Channel:11:1" Name="" PinholeSize="600.000028498471" SamplesPerPixel="1"> <LightSourceSettings Attenuation="0.7999756" ID="LightSource:11:3"/> - <DetectorSettings Gain="541.027695124743" ID="Detector:11:1" Offset="-1.48666666666666"/> + <DetectorSettings Gain="541.275654230564" ID="Detector:11:1" Offset="0.38666666666667"/> </Channel> <Channel Color="-16711681" ExcitationWavelength="543" ID="Channel:11:2" Name="" PinholeSize="600.000028498471" SamplesPerPixel="1"> <LightSourceSettings Attenuation="0.6999939" ID="LightSource:11:6"/> - <DetectorSettings Gain="444.743266956588" ID="Detector:11:2" Offset="-0.546666666666667"/> + <DetectorSettings Gain="541.027695124743" ID="Detector:11:2" Offset="-1.48666666666666"/> </Channel> <Channel Color="-16776961" ExcitationWavelength="633" ID="Channel:11:3" Name="" PinholeSize="600.000028498471" SamplesPerPixel="1"> <LightSourceSettings Attenuation="0.6999939" ID="LightSource:11:7"/> - <DetectorSettings Gain="1080.62485694667" ID="Detector:11:3" Offset="-0.233333333333334"/> + <DetectorSettings Gain="444.743266956588" ID="Detector:11:3" Offset="-0.546666666666667"/> </Channel>
comment:9 Changed 12 years ago by mlinkert
- Owner changed from mlinkert-x to wmoore
I think this is fixed with https://github.com/melissalinkert/bioformats/commit/9d93b4f247d628d766a532839acb41a6f37895c2
Note 1: I did change the DetectorRef? IDs to what seems to be correct to me (the first SizeC detectors are pulled from the LDM_Block_Sequential_Master node, but these Detectors do not have the correct offset/gain associated with them). If that looks wrong to you, then just let me know and I'll switch it back.
Note 2: diff'ing the new OME-XML vs. what is in the repository will show a mismatch for some of the DetectorSettings?.Offset values; this is because the repository file has the values set to "0", where "0.0" is what is actually populated.
Note 3: the offsets for Detector:4:3 and Detector:11:2 (on the actual Detector, not the DetectorSettings?) will mismatch. I think that the current values that Bio-Formats is populating are correct, since they match the DetectorSettings? for the same Detectors (if that makes sense).
comment:10 Changed 12 years ago by wmoore
- Owner changed from wmoore to mlinkert-x
Something's messed up with the Detector references. The Refs are not valid as far as I can see (don't exist under instrument).
E.g. Detector:2:7 does not exist.
$ java -Xmx512m loci.formats.tools.ImageInfo -nopix -omexml-only -no-sas -xmlspaces 4 /Users/will/Documents/biology-data/Test-Import-Images/Martin/Leica-SP5/sample\ files.lif | grep "Detector:" <Detector ID="Detector:2:0" Model="PMT 1" Type="PMT" Voltage="0.0" Zoom="1.0"/> <Detector ID="Detector:2:1" Model="PMT 2" Type="PMT" Voltage="0.0" Zoom="1.0"/> <Detector ID="Detector:2:2" Model="PMT Trans" Type="PMT" Voltage="0.0" Zoom="1.0"/> <Detector ID="Detector:2:3" Model="PMT 4" Offset="0.466666666666669" Type="PMT" Voltage="382.658121614405" Zoom="1.0"/> <Detector ID="Detector:4:0" Model="PMT 1" Type="PMT" Voltage="0.0" Zoom="3.8750036954915"/> <Detector ID="Detector:4:1" Model="PMT Trans" Type="PMT" Voltage="0.0" Zoom="3.8750036954915"/> <Detector ID="Detector:4:2" Model="PMT 4" Type="PMT" Voltage="0.0" Zoom="3.8750036954915"/> <Detector ID="Detector:4:3" Model="PMT 4" Offset="0.0" Type="PMT" Voltage="402.265964751659" Zoom="3.8750036954915"/> <Detector ID="Detector:8:0" Model="PMT 1" Type="PMT" Voltage="0.0" Zoom="1.0"/> <Detector ID="Detector:8:1" Model="PMT 2" Type="PMT" Voltage="0.0" Zoom="1.0"/> <Detector ID="Detector:8:2" Model="PMT 3" Offset="0.38666666666667" Type="PMT" Voltage="535.915922789349" Zoom="1.0"/> <Detector ID="Detector:8:3" Model="PMT 4" Type="PMT" Zoom="1.0"/> <Detector ID="Detector:9:0" Model="PMT 1" Offset="0.38666666666667" Type="PMT" Voltage="407.434958419165" Zoom="1.0"/> <Detector ID="Detector:9:1" Model="PMT 1" Type="PMT" Zoom="1.0"/> <Detector ID="Detector:9:2" Model="PMT 2" Type="PMT" Zoom="1.0"/> <Detector ID="Detector:9:3" Model="PMT 3" Type="PMT" Zoom="1.0"/> <Detector ID="Detector:9:4" Model="PMT 4" Type="PMT" Zoom="1.0"/> <Detector ID="Detector:10:0" Model="PMT 1" Type="PMT" Voltage="0.0" Zoom="1.0"/> <Detector ID="Detector:10:1" Model="PMT 2" Type="PMT" Voltage="0.0" Zoom="1.0"/> <Detector ID="Detector:10:2" Model="PMT 3" Offset="0.38666666666667" Type="PMT" Voltage="444.743266956588" Zoom="1.0"/> <Detector ID="Detector:10:3" Model="PMT 4" Type="PMT" Zoom="1.0"/> <Detector ID="Detector:11:0" Model="PMT 3" Type="PMT" Voltage="0.0" Zoom="1.0"/> <Detector ID="Detector:11:1" Model="PMT 1" Type="PMT" Voltage="0.0" Zoom="1.0"/> <Detector ID="Detector:11:2" Model="PMT 2" Offset="0.38666666666667" Type="PMT" Voltage="444.743266956588" Zoom="1.0"/> <Detector ID="Detector:11:3" Model="PMT 3" Type="PMT" Zoom="1.0"/> <Detector ID="Detector:11:4" Model="PMT 4" Type="PMT" Zoom="1.0"/> <DetectorSettings Gain="517.776760509651" ID="Detector:2:7" Offset="0.466666666666669"/> <DetectorSettings Gain="415.503166247044" ID="Detector:2:8" Offset="0.0"/> <DetectorSettings Gain="285.839627679866" ID="Detector:2:9" Offset="1.18000000000001"/> <DetectorSettings Gain="382.658121614405" ID="Detector:2:10" Offset="0.0"/> <DetectorSettings Gain="362.058442053864" ID="Detector:4:9" Offset="0.0"/> <DetectorSettings Gain="402.265964751659" ID="Detector:4:10" Offset="0.0"/> <DetectorSettings Gain="407.434958419165" ID="Detector:8:7" Offset="0.38666666666667"/> <DetectorSettings Gain="434.634164950027" ID="Detector:8:8" Offset="-1.48666666666666"/> <DetectorSettings Gain="535.915922789349" ID="Detector:8:9" Offset="-0.546666666666667"/> <DetectorSettings Gain="556.496528572519" ID="Detector:8:10" Offset="-0.233333333333334"/> <DetectorSettings Gain="407.434958419165" ID="Detector:9:8" Offset="0.38666666666667"/> <DetectorSettings Gain="434.634164950027" ID="Detector:9:9" Offset="-1.48666666666666"/> <DetectorSettings Gain="535.915922789349" ID="Detector:9:10" Offset="-0.546666666666667"/> <DetectorSettings Gain="556.496528572519" ID="Detector:9:11" Offset="-0.233333333333334"/> <DetectorSettings Gain="541.275654230564" ID="Detector:10:7" Offset="0.38666666666667"/> <DetectorSettings Gain="541.027695124743" ID="Detector:10:8" Offset="-1.48666666666666"/> <DetectorSettings Gain="444.743266956588" ID="Detector:10:9" Offset="-0.546666666666667"/> <DetectorSettings Gain="1080.62485694667" ID="Detector:10:10" Offset="-0.233333333333334"/> <DetectorSettings Gain="541.275654230564" ID="Detector:11:8" Offset="0.38666666666667"/> <DetectorSettings Gain="541.027695124743" ID="Detector:11:9" Offset="-1.48666666666666"/> <DetectorSettings Gain="444.743266956588" ID="Detector:11:10" Offset="-0.546666666666667"/> <DetectorSettings Gain="1080.62485694667" ID="Detector:11:11" Offset="-0.233333333333334"/>
I'm also seeing differences in Offset for a Detectors:
- <Detector ID="Detector:11:2" Model="PMT 2" Offset="-0.546666666666667" Type="PMT" Voltage="444.743266956588" Zoom="1.0"/> + <Detector ID="Detector:11:2" Model="PMT 2" Offset="0.38666666666667" Type="PMT" Voltage="444.743266956588" Zoom="1.0"/>
0.38666666666667 is the Offset value for 'PMT 1' in this image (never for 'PMT 2').
Another offset Difference (my mistake) has been fixed https://github.com/will-moore/openmicroscopy/commit/c4f7bb1dc3f0aecfa1ede53238a7635d97738ac4
comment:11 Changed 12 years ago by mlinkert
- Owner changed from mlinkert-x to wmoore
I think these commits will work:
https://github.com/melissalinkert/bioformats/commit/520335e018b8a37d6014d4daf5ca3e05d14de575
https://github.com/melissalinkert/bioformats/commit/dd4fd0dd07337020c5194a730d0046e9fcb24d95
As we discussed in devteam, the extra Detectors are now stripped out. Offsets are now populated on several more Detectors; I think this is actually correct, but let me know if you think otherwise.
comment:12 Changed 12 years ago by jburel
- Sprint changed from 2012-03-13 (10) to 2012-03-27 (11)
Moved from sprint 2012-03-13 (10)
comment:13 Changed 12 years ago by wmoore
- Resolution set to fixed
- Status changed from accepted to closed
This seems to be working fine now. The only comment I would make is that Offsets are getting set on the Detector AND DetectorSettings?. This is not wrong, just seems uncessary. Anyway, everything else is fine. Changes to add Offsets to the Detectors themselves are in https://github.com/will-moore/openmicroscopy/commit/b0f05c4e23a9d38563d861a103d498c7104749a2 to bring the omexml_repo into line with BF.
Closing...
Pretty sure that this is working with this commit: https://github.com/melissalinkert/bioformats/commit/98f209dbd7ee4e3f934c44a67654d27e0618909b
Passing back to you, Will, for final testing.