DiamondLightSource / hyperion

Unattended Data Collection using BlueSky / Ophyd
BSD 3-Clause "New" or "Revised" License
6 stars 5 forks source link

Put wavelength into ispyb before datacollection #1550

Closed DominicOram closed 3 weeks ago

DominicOram commented 3 weeks ago

For the GPU analysis to run it needs to know the wavelength (derived from energy) of the beamline. Currently we do not put this in to ispyb until during the collection.

Acceptance Criteria

graeme-winter commented 3 weeks ago

This is however in the header packet, as the detector needs to know this to get the thresholds correct as the default

Grey-Area i04-eiger-slow :) $ h5ls -d bs_std_5_meta.h5/config
config                   Dataset {SCALAR}
    Data:
         "{u'countrate_correction_applied': True, u'ntrigger': 1, u'detector_readout_time': 1.0000000116860974e-07, u'detector_distance': 0.32999037193371134, u'sensor_material': u'Si', u'y_pixel_size': 7.5e-05, u'two_theta_start': 0, u'threshold_energy': 6328.94" '9' repeats 9 times ", u'omega_increment': 0, u'kappa_start': 0, u'compression': u'bslz4', u'eiger_fw_version': u'integration-19.5.27.37728-g58ecee3f6', u'bit_depth_image': 32, u'kappa_increment': 0, u'frame_time': 0.20000000298023224, u'bit_depth_readout': 16, u'count_time': 0.19999989867210388, u'photon_energy': 12657.8" '9' repeats 9 times "8, u'sensor_thickness': 0.00045, u'nimages': 1, u'phi_start': 0, u'software_version': u'1.8.0', u'auto_summation': True, u'flatfield_correction_applied': True, u'frame_period': 0.010536836460232735, u'y_pixels_in_detector': 4362, u'pixel_mask_applied': True, u'phi_increment': 0, u'wavelength': 0.9795004937627886, u'virtual_pixel_correction_applied': True, u'omega_start': 0, u'data_collection_date': u'2019-10-02T10:11:24.254-01:00', u'x_pixel_size': 7.5e-05, u'detector_number': u'E-32-0118', u'chi_start': 0, u'chi_increment': 0, u'trigger_mode': u'exts', u'two_theta_increment': 0, u'beam_center_y': 2130.7266296478792, u'beam_center_x': 2142.7873797399557, u'x_pixels_in_detector': 4148, u'detector_translation': [0, 0, -0.32999037193371134], u'frame_count_time': 0.010536836460232735}
graeme-winter commented 3 weeks ago

By header packet, I mean, the packet sent over zeroMQ on detector arm

DominicOram commented 3 weeks ago

@ndevenish how would you feel about getting it out of the header packet instead? I think it's cleaner to try and get as much as possible out of there rather than ispyb to keep it self contained but if that will be hard putting it in ispyb our side is probably only a half day job

ndevenish commented 3 weeks ago

If it’s in the header packet then that works fine

DominicOram commented 3 weeks ago

Great, in which case I'll close this from our side, do you think it will be viable to get it read out of the header packet from your side by testing next week?

ndevenish commented 3 weeks ago

@dimitrivlachos do you feel like tackling that?

graeme-winter commented 3 weeks ago

I have done this before and I will do this again, so if any pointers are needed I am sure I have them. But happy for someone who is not me to pick this up.

dimitrivlachos commented 3 weeks ago

Sure, I can give it a crack!

DominicOram commented 3 weeks ago

Closing as covered by linked analysis issue