Conversation
SimonHeybrock
left a comment
There was a problem hiding this comment.
Note that ESSreflectometry calls this ProtonCurrent and has its own providers. Should I rename it and use the same domain type? Or should we wait until we have an actual ESTIA NeXus loader for experimental files?
If the ProtonCurrent is a charge it should be renamed, if it is actually a current then the workflow should be changed, either to compute current from charge, or use charge directly?
|
|
||
|
|
||
| class ProductionInfo(snx.NXsource): | ||
| """A specialized NXsource for neutron production information (accelerator). |
There was a problem hiding this comment.
This is confusing. The accelerator has no neutrons. Production of what?
There was a problem hiding this comment.
But the accelerator is used to produce neutrons. I took the name from the nexus files. The group contains
grp beam_cycle_id/
grp beam_destination/
grp beam_destination_mode/
grp beam_mode/
grp beam_present/
grp beam_pulse_end_event_counter/
grp beam_pulse_end_event_id/
grp beam_pulse_length/
grp beam_pulse_start_event_counter/
grp beam_state/
grp cryo_tt_82025_temperature/
grp cryo_tt_82027_temperature/
grp cryo_tt_82029_temperature/
grp cryo_tt_82031_temperature/
grp cryo_tt_82033_temperature/
grp cycle_start_event_counter/
grp data_buffer_sent_offset/
() 16B utf-8 depends_on .
grp flat_top_current/
grp fsm_machine_active/
grp high_beta_flat_top_current/
grp high_beta_pulse_charge/
grp high_beta_pulse_width/
grp intended_proton_current/
grp intended_proton_energy/
() 16B utf-8 name accelerator
grp ni_acq_start_event_counter/
grp ni_sync_event_counter/
() 16B utf-8 probe proton
grp pulse_charge/
grp pulse_width/
grp raster_pattern/
() 16B utf-8 target_material W
grp target_segment/
grp transformations/
() 16B utf-8 type Spallation Neutron Source
There was a problem hiding this comment.
So you say it corresponds the group name in NeXus? That's a good convention then.
There was a problem hiding this comment.
It does approximately, the name is 'neutron_prod_info'.
ESS NeXus files only encode the charge each second. You could convert that to a current but I doubt that anyone would do that. In reflectometry, the 'proton current' is currently dimensionless. So it is not clear what it represents. @jokasimr can you clarify? |
|
Fine, but what I meant is that I can't tell based on the code what unit it should have. Should it be |
|
I don't mind, either "_current" or "_charge" works for me. But it might make sense to use the same convention that ECDC uses when they store the proton current in the nexus files. |
|
@jokasimr Can you review the reflectometry-specific changes here? Thanks! |
c944ea7 to
cbb6243
Compare
cbb6243 to
9aa2b0e
Compare
|
Looks good to me 👍 |
This moves the proton charge loader provider from ESSimaging into ESSreduce. I changed the parameters a little to make it fit into the workflow more neatly (
ProtonChargeis not aComponentand so shouldn't have aNeXusName.)I did not generalise the normalisation because of #551.
Note that ESSreflectometry calls this
ProtonCurrentand has its own providers. Should I rename it and use the same domain type? Or should we wait until we have an actual ESTIA NeXus loader for experimental files?