AdvancedPhotonSource / GSAS-II

Home for GSAS-II: crystallographic and diffraction-based structural characterization of materials
Other
33 stars 14 forks source link

HDF-5 Image importer: use specified pixel size #87

Closed briantoby closed 3 weeks ago

briantoby commented 1 month ago

The pixel size for varex hdf5 is automatically populated as 74.8 um.

Can this be changed so that GSAS2 enters the values from attributes "DetPixelSizeX" and "DetPixelSizeY"?

Example file: /home/beams/S1IDUSER/mnt/s1c/mpe_sep24/varexC/ -rw-rw-r-- 1 s1iduser xfdop 159M Oct 4 14:11 CeO2_1s_000212.vrx.h5 (copy in ~/Scratch)

briantoby commented 3 weeks ago

I don’t see attributes "DetPixelSizeX" and "DetPixelSizeY" unless I am looking in the wrong place:

fp['misc'].keys() Out [10]: <KeysViewHDF5 ['BDSSlitsHCenter', 'BDSSlitsHSize', 'BDSSlitsVCenter', 'BDSSlitsVSize', 'DetADCoreVersion', 'DetAcqPeriod', 'DetAcqTime', 'DetArrayCounter', 'DetBinX', 'DetBinY', 'DetDataType', 'DetDriverVersion', 'DetFilePath', 'DetFirmwareVersion', 'DetFullFileName', 'DetGain', 'DetHDFPlugInVersion', 'DetManufacturer', 'DetMaxSizeX', 'DetMaxSizeY', 'DetMinX', 'DetMinY', 'DetModel', 'DetSDKVersion', 'DetSampleName', 'DetSaveDest', 'DetSerialNumber', 'DetSizeX', 'DetSizeY', 'DetTemperature', 'DetZ', 'IDEnergy', 'IDGap', 'NDArrayEpicsTSSec', 'NDArrayEpicsTSnSec', 'NDArrayTimeStamp', 'NDArrayUniqueId', 'timestamp']>

I do see 10 values (for 10 images) for 'DetBinX', 'DetBinY'. I presume that when you rebin, say to 4x4 those will be each be 4 and the image will be 720x720 rather than 2880x2880. Correct?

Can you point to a file that does have a pixel size in it? Also, if you do have a file with binning, I’d like to play with that too.

briantoby commented 3 weeks ago

Newer files have the pixel size. Now using dark_0.2s_000360.vrx.h5

scp xgate.xray.aps.anl.gov:/home/beams/S1IDUSER/mnt/s1c/mpe_sep24/varexC/dark_0.2s_000360.vrx.h5 ~/Scratch

briantoby commented 3 weeks ago

mismatch between # of values & # of images. Asking for more info

briantoby commented 3 weeks ago

This has been addressed in b04610b, though further work may be needed if the format changes -- and I am suggesting that more work on HDF5 schemas would be a really good idea.