|
20 | 20 | COMPONENT_CONSTRAINTS, |
21 | 21 | AllNeXusComponents, |
22 | 22 | Beamline, |
23 | | - CalibratedBeamline, |
24 | 23 | Component, |
25 | 24 | DetectorBankSizes, |
26 | 25 | DetectorPositionOffset, |
@@ -364,9 +363,7 @@ def get_calibrated_detector( |
364 | 363 | """ |
365 | 364 | Extract the data array corresponding to a detector's signal field. |
366 | 365 |
|
367 | | - The returned data array includes coords and masks pertaining directly to the |
368 | | - signal values array, but not additional information about the detector. The |
369 | | - data array is reshaped to the logical detector shape, which by folding the data |
| 366 | + The data array is reshaped to the logical detector shape, by folding the data |
370 | 367 | array along the detector_number dimension. |
371 | 368 |
|
372 | 369 | Parameters |
@@ -400,43 +397,8 @@ def get_calibrated_detector( |
400 | 397 | ) |
401 | 398 |
|
402 | 399 |
|
403 | | -def assemble_beamline( |
404 | | - detector: EmptyDetector[RunType], |
405 | | - source_position: Position[snx.NXsource, RunType], |
406 | | - sample_position: Position[snx.NXsample, RunType], |
407 | | - gravity: GravityVector, |
408 | | -) -> CalibratedBeamline[RunType]: |
409 | | - """ |
410 | | - Add beamline information (gravity vector, source- and sample-position) to detector. |
411 | | -
|
412 | | - This is performed separately and after :py:func:`get_calibrated_detector` to avoid |
413 | | - as false dependency of, e.g., the reshaped detector numbers on the sample position. |
414 | | - The latter can change during a run, e.g., for a rotating sample. The detector |
415 | | - numbers might be used, e.g., to mask certain detector pixels, and should not depend |
416 | | - on the sample position. |
417 | | -
|
418 | | - Parameters |
419 | | - ---------- |
420 | | - detector: |
421 | | - NeXus detector group. |
422 | | - source_position: |
423 | | - Position of the neutron source. |
424 | | - sample_position: |
425 | | - Position of the sample. |
426 | | - gravity: |
427 | | - Gravity vector. |
428 | | - """ |
429 | | - return CalibratedBeamline[RunType]( |
430 | | - detector.assign_coords( |
431 | | - source_position=source_position, |
432 | | - sample_position=sample_position, |
433 | | - gravity=gravity, |
434 | | - ) |
435 | | - ) |
436 | | - |
437 | | - |
438 | 400 | def assemble_detector_data( |
439 | | - detector: CalibratedBeamline[RunType], |
| 401 | + detector: EmptyDetector[RunType], |
440 | 402 | event_data: NeXusData[snx.NXdetector, RunType], |
441 | 403 | ) -> RawDetector[RunType]: |
442 | 404 | """ |
@@ -655,7 +617,6 @@ def load_measurement_metadata_from_nexus( |
655 | 617 | no_detector_position_offset, |
656 | 618 | load_nexus_sample, |
657 | 619 | get_calibrated_detector, |
658 | | - assemble_beamline, |
659 | 620 | assemble_detector_data, |
660 | 621 | ) |
661 | 622 |
|
|
0 commit comments