@@ -231,6 +231,10 @@ def load_beer_mcstas_provider(
231231def mcstas_chopper_delay_from_mode (
232232 da : DetectorData [SampleRun ],
233233) -> WavelengthDefinitionChopperDelay :
234+ '''These settings are good for the set of McStas runs that we
235+ use in the docs currently.
236+ Eventually we will want to determine this from the chopper information
237+ in the files, but that information is not in the simulation output.'''
234238 mode = next (iter (d .coords ['mode' ] for d in da .values ())).value
235239 if mode in ('7' , '8' , '9' , '10' ):
236240 return sc .scalar (0.0024730158730158727 , unit = 's' )
@@ -239,6 +243,25 @@ def mcstas_chopper_delay_from_mode(
239243 raise ValueError (f'Mode { mode } is not known.' )
240244
241245
246+ def mcstas_chopper_delay_from_mode_new_simulations (
247+ da : DetectorData [SampleRun ],
248+ ) -> WavelengthDefinitionChopperDelay :
249+ '''Celine has a new simulation with some changes to the chopper placement(?).
250+ For those simulations we need to adapt the chopper delay values.'''
251+ mode = next (iter (d .coords ['mode' ] for d in da .values ())).value
252+ if mode == '7' :
253+ return sc .scalar (0.001370158730158727 , unit = 's' )
254+ if mode == '8' :
255+ return sc .scalar (0.001370158730158727 , unit = 's' )
256+ if mode == '9' :
257+ return sc .scalar (0.0022630158730158727 , unit = 's' )
258+ if mode == '10' :
259+ return sc .scalar (0.0022630158730158727 , unit = 's' )
260+ if mode == '16' :
261+ return sc .scalar (0.000476984126984127 , unit = 's' )
262+ raise ValueError (f'Mode { mode } is not known.' )
263+
264+
242265def mcstas_modulation_period_from_mode (da : DetectorData [SampleRun ]) -> ModulationPeriod :
243266 mode = next (iter (d .coords ['mode' ] for d in da .values ())).value
244267 if mode in ('7' , '8' ):
0 commit comments