Commit ec9c5ab8 authored by yuedong0607's avatar yuedong0607
Browse files

Align detector and focal-plane coordinates across releases

Apply native pixel geometry, corrected science rotations, channel labels, and FGS1/FGS2 placement to next and legacy 1.0.0. Adapt spatial effects, rendering, distortion, and FITS readout WCS to the coordinate mapping.

Set next science gains to 1.6 e-/ADU. Keep the layout plotter in diagnostics and update its documented invocation.

Validation: both release catalogs and both layout generations pass. Detector, coordinate, and channel tests: 109 passed, 2 skipped, with two existing failures for next FGS formatting and bias placeholders.
parent 687c267d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -12,5 +12,6 @@ pnodes
coverage

# Local diagnostic scripts and generated artifacts
/diagnostics/
/diagnostics/*
!/diagnostics/plot_detector_layout.py
/observation_sim/sky_background/tools/diagnostic_plots.py
+103 −2
Original line number Diff line number Diff line
@@ -26,9 +26,10 @@ are not accepted as release policy.

The built-in compositions currently pin:

- `legacy-v1`: definition set `legacy/1.0.0`;
- `legacy-v1`: definition set `legacy/1.0.0` with 30 science slots (`01` through
  `30`) and the same corrected science/FGS1/FGS2 coordinate convention as `next-v1`;
- `next-v1`: definition set `next/1.0.0` with 31 science slots (`00` through
  `30`) and the existing FGS definitions;
  `30`), updated FGS1/FGS2 placement, and retained FGS3/FGS4 definitions;
- `legacy-v1` pins its detector, bandpass, band-scalar optics, and shared
  sky-background references `1.0.0`;
- `next-v1` pins detector responses, filter transmissions, system throughputs,
@@ -111,6 +112,106 @@ configs = instrument.materialized_detector_reference_paths(
)
```

### Detector and focal-plane coordinates

Both `legacy/1.0.0` and `next/1.0.0` use `placement.axis_mapping: swap_xy`
for science chips and FGS1/FGS2 (`31`–`38`). Legacy contains science chips
`01`–`30`; next also includes chip `00`. The corresponding science slots use
the same corrected rotations (including the 1-degree tilts), and FGS1/FGS2
use the same translated centres and distortion reference-frame rotation.
Legacy retains its own detector sizes, scans, filters, and calibrations.

`axis_mapping` defaults to `identity` for definitions that omit it. FGS3/FGS4
(`39`–`42`) retain that setting and their previous placement/readout definitions
in both releases. They are not included in the accepted layout plot; run
selection is still controlled by the observation configuration.

Native arrays have shape `(ny, nx)`. Integer `(x, y)` denotes the centre of
`array[y, x]`; the first pixel centre is `(0, 0)` and the outer edge starts at
`(-0.5, -0.5)`. Channel `BBox` values remain zero-based half-open **array slices**.
For a detector of size `(nx, ny)`, the mapping to focal-plane millimetres is

```text
focal_mm = centre_mm + R(rotation_deg) @ A @ diag(pitch_x_mm, pitch_y_mm)
                     @ ([x, y] - [(nx-1)/2, (ny-1)/2])
A = [[0, 1], [1, 0]] for swap_xy; identity otherwise.
```

The axis swap changes handedness; it is applied before the stored rotation.
It is separate from each channel's `detector_to_raw` readout transformation.
Plotting +X to the left is only a display setting. It does not add a reflection
to the data. FGS1/FGS2 centres have already been changed in the definition file
from `(x, y)` to `(y, -x)`; runtime code must not repeat that operation.

In native coordinates (+x right, +y up), the approved channels are:

```text
16 15 14 13 12 11 10  9
 1  2  3  4  5  6  7  8
```

Upper-row IDs and their raw/output placement metadata were renamed together.
The physical segment dimensions, scan regions, and readout directions are
retained. Science formatted output is CH01 through CH16. FGS1/FGS2 use a new
`fgs_16ch_native` mode so FGS3/FGS4 keep their old mode. Existing per-channel
calibration overrides are empty; future overrides must use the new IDs.
Crosstalk and gain processing follow `iter_channels()` order; FITS GAINnn keys
are assigned by channel ID.

Legacy science raw mosaics remain 10000 × 9400 pixels, with delivered output
20000 × 4700 pixels. Legacy FGS1/FGS2 retain their 24096 × 3924 formatted
output (1 × 16 channels, now ordered CH01 through CH16). Next's FGS mode has
no formatted-output definition and continues to deliver its 2 × 8 raw mosaic.

```python
detector = instrument.detector("01")
geometry = detector.geometry
xy_mm = geometry.detector_to_focal([0, 0])
xy_native = geometry.focal_to_detector(xy_mm)
outline_mm = geometry.corners_mm()
channel_outline_mm = detector.channel_corners_mm("CH16")
inside = geometry.contains_focal(xy_mm)
```

For opted-in chips, GalSim active images start at `(0, 0)` and their TAN WCS
composes this geometry with the pointing WCS. `chip.bound` remains a physical
axis-aligned enclosure in focal reference pixels; it must not set an active
image's origin. Catalog coverage uses the native image WCS, and containment
uses native pixel edges. FITS active-image coordinates start at `(1, 1)`;
serialization performs that conversion once. GalSim's half-pixel centering
correction for even-sized rendered stamps is independent of this convention.

Shutter transmission is sampled at each pixel's **global X in mm**, including
chip tilt. Smooth illumination is a global focal-plane field (its coefficients
use 10-micron reference units); LED maps are sampled in their global-axis
reference tiles. PRNU remains indexed in native detector pixels. PSF positions
and focal-axis kernels are converted at the reference boundary, including
slitless PCA interpolation/convolution.

Spatial `ReferenceTarget.coordinate_rotation_deg` declares the rotation from
reference axes to global focal-plane axes (default zero). The unchanged FGS1/2
distortion files require `-90` degrees. Distortion input positions are mapped
into those reference axes, and output positions and derivatives back to the
global frame before conversion to native pixels. Reference arrays themselves
are not rewritten.

A raw mosaic includes flips, scan pixels, and rearranged channels, so it has no
single active-image celestial WCS. Native-mode raw FITS products retain the
IMAGE extension and add a `CHANNEL_WCS` binary table with one row per channel:
`CHANNEL`, `RAWSEC`, `DATASEC`, `CRPIX1/2`, and `CD1_1` through `CD2_2`.
`CTYPE1/2`, `CRVAL1/2`, and `CUNIT1/2` are shared in the table header. Each row
maps **full-mosaic FITS coordinates** to the sky, valid only inside its DATASEC;
scan pixels have no sky coordinates. The IMAGE header marks `WCSLAY=CHANNELS`
and omits misleading global WCS cards. Active outputs retain a normal TAN WCS.
Consumers of raw FITS products must read the per-channel table.

Regenerate the science + FGS1/FGS2 overview and detector atlas with:

```bash
python -m diagnostics.plot_detector_layout --release next-v1 --output-dir /path/to/next-output
python -m diagnostics.plot_detector_layout --release legacy-v1 --output-dir /path/to/legacy-output
```

### Spectral response contracts

Imaging files in `system_throughput` are complete total-system responses. They
+2 −0
Original line number Diff line number Diff line
from .geometry import DetectorGeometry
from .detector_response import load_detector_response
from .models import (
    BBox,
@@ -31,6 +32,7 @@ __all__ = [
    "ChannelGeometry",
    "DEFAULT_RELEASE",
    "DetectorType",
    "DetectorGeometry",
    "Electronics",
    "FilterCatalog",
    "FilterDefinition",
+92 −54
Original line number Diff line number Diff line
@@ -19,7 +19,8 @@ detectors:
  placement:
    x_mm: 251.5
    y_mm: -202.6
    rotation_deg: -1.0
    rotation_deg: 91.0
    axis_mapping: swap_xy
  optical_role:
    filter: GI
    survey: spectroscopic
@@ -31,7 +32,8 @@ detectors:
  placement:
    x_mm: 251.5
    y_mm: -101.3
    rotation_deg: -1.0
    rotation_deg: 91.0
    axis_mapping: swap_xy
  optical_role:
    filter: GV
    survey: spectroscopic
@@ -44,7 +46,8 @@ detectors:
  placement:
    x_mm: 251.5
    y_mm: 0.0
    rotation_deg: -1.0
    rotation_deg: 91.0
    axis_mapping: swap_xy
  optical_role:
    filter: GU
    survey: spectroscopic
@@ -57,7 +60,8 @@ detectors:
  placement:
    x_mm: 251.5
    y_mm: 101.3
    rotation_deg: -1.0
    rotation_deg: 91.0
    axis_mapping: swap_xy
  optical_role:
    filter: GU
    survey: spectroscopic
@@ -69,7 +73,8 @@ detectors:
  placement:
    x_mm: 251.5
    y_mm: 202.6
    rotation_deg: -1.0
    rotation_deg: 91.0
    axis_mapping: swap_xy
  optical_role:
    filter: GV
    survey: spectroscopic
@@ -81,7 +86,8 @@ detectors:
  placement:
    x_mm: 146.25
    y_mm: -202.6
    rotation_deg: 0.0
    rotation_deg: -90.0
    axis_mapping: swap_xy
  optical_role:
    filter: y
    survey: photometric
@@ -93,7 +99,8 @@ detectors:
  placement:
    x_mm: 146.25
    y_mm: -101.3
    rotation_deg: 0.0
    rotation_deg: -90.0
    axis_mapping: swap_xy
  optical_role:
    filter: i
    survey: photometric
@@ -105,7 +112,8 @@ detectors:
  placement:
    x_mm: 146.25
    y_mm: 0.0
    rotation_deg: 0.0
    rotation_deg: -90.0
    axis_mapping: swap_xy
  optical_role:
    filter: g
    survey: photometric
@@ -117,7 +125,8 @@ detectors:
  placement:
    x_mm: 146.25
    y_mm: 101.3
    rotation_deg: 0.0
    rotation_deg: -90.0
    axis_mapping: swap_xy
  optical_role:
    filter: r
    survey: photometric
@@ -129,7 +138,8 @@ detectors:
  placement:
    x_mm: 154.0
    y_mm: 202.6
    rotation_deg: -1.0
    rotation_deg: -89.0
    axis_mapping: swap_xy
  optical_role:
    filter: GI
    survey: spectroscopic
@@ -141,7 +151,8 @@ detectors:
  placement:
    x_mm: 48.75
    y_mm: -202.6
    rotation_deg: 0.0
    rotation_deg: 90.0
    axis_mapping: swap_xy
  optical_role:
    filter: z
    survey: photometric
@@ -154,7 +165,8 @@ detectors:
  placement:
    x_mm: 48.75
    y_mm: -101.3
    rotation_deg: 0.0
    rotation_deg: 90.0
    axis_mapping: swap_xy
  optical_role:
    filter: NUV
    survey: photometric
@@ -167,7 +179,8 @@ detectors:
  placement:
    x_mm: 48.75
    y_mm: 0.0
    rotation_deg: 0.0
    rotation_deg: 90.0
    axis_mapping: swap_xy
  optical_role:
    filter: NUV
    survey: photometric
@@ -180,7 +193,8 @@ detectors:
  placement:
    x_mm: 48.75
    y_mm: 101.3
    rotation_deg: 0.0
    rotation_deg: 90.0
    axis_mapping: swap_xy
  optical_role:
    filter: u
    survey: photometric
@@ -192,7 +206,8 @@ detectors:
  placement:
    x_mm: 48.75
    y_mm: 202.6
    rotation_deg: 0.0
    rotation_deg: 90.0
    axis_mapping: swap_xy
  optical_role:
    filter: y
    survey: photometric
@@ -204,7 +219,8 @@ detectors:
  placement:
    x_mm: -48.75
    y_mm: -202.6
    rotation_deg: 0.0
    rotation_deg: -90.0
    axis_mapping: swap_xy
  optical_role:
    filter: y
    survey: photometric
@@ -217,7 +233,8 @@ detectors:
  placement:
    x_mm: -48.75
    y_mm: -101.3
    rotation_deg: 0.0
    rotation_deg: -90.0
    axis_mapping: swap_xy
  optical_role:
    filter: u
    survey: photometric
@@ -230,7 +247,8 @@ detectors:
  placement:
    x_mm: -48.75
    y_mm: 0.0
    rotation_deg: 0.0
    rotation_deg: -90.0
    axis_mapping: swap_xy
  optical_role:
    filter: NUV
    survey: photometric
@@ -243,7 +261,8 @@ detectors:
  placement:
    x_mm: -48.75
    y_mm: 101.3
    rotation_deg: 0.0
    rotation_deg: -90.0
    axis_mapping: swap_xy
  optical_role:
    filter: NUV
    survey: photometric
@@ -255,7 +274,8 @@ detectors:
  placement:
    x_mm: -48.75
    y_mm: 202.6
    rotation_deg: 0.0
    rotation_deg: -90.0
    axis_mapping: swap_xy
  optical_role:
    filter: z
    survey: photometric
@@ -267,7 +287,8 @@ detectors:
  placement:
    x_mm: -154.0
    y_mm: -202.6
    rotation_deg: 1.0
    rotation_deg: 89.0
    axis_mapping: swap_xy
  optical_role:
    filter: GI
    survey: spectroscopic
@@ -279,7 +300,8 @@ detectors:
  placement:
    x_mm: -146.25
    y_mm: -101.3
    rotation_deg: 0.0
    rotation_deg: 90.0
    axis_mapping: swap_xy
  optical_role:
    filter: r
    survey: photometric
@@ -291,7 +313,8 @@ detectors:
  placement:
    x_mm: -146.25
    y_mm: 0.0
    rotation_deg: 0.0
    rotation_deg: 90.0
    axis_mapping: swap_xy
  optical_role:
    filter: g
    survey: photometric
@@ -303,7 +326,8 @@ detectors:
  placement:
    x_mm: -146.25
    y_mm: 101.3
    rotation_deg: 0.0
    rotation_deg: 90.0
    axis_mapping: swap_xy
  optical_role:
    filter: i
    survey: photometric
@@ -315,7 +339,8 @@ detectors:
  placement:
    x_mm: -146.25
    y_mm: 202.6
    rotation_deg: 0.0
    rotation_deg: 90.0
    axis_mapping: swap_xy
  optical_role:
    filter: y
    survey: photometric
@@ -327,7 +352,8 @@ detectors:
  placement:
    x_mm: -251.5
    y_mm: -202.6
    rotation_deg: 1.0
    rotation_deg: -91.0
    axis_mapping: swap_xy
  optical_role:
    filter: GV
    survey: spectroscopic
@@ -340,7 +366,8 @@ detectors:
  placement:
    x_mm: -251.5
    y_mm: -101.3
    rotation_deg: 1.0
    rotation_deg: -91.0
    axis_mapping: swap_xy
  optical_role:
    filter: GU
    survey: spectroscopic
@@ -353,7 +380,8 @@ detectors:
  placement:
    x_mm: -251.5
    y_mm: 0.0
    rotation_deg: 1.0
    rotation_deg: -91.0
    axis_mapping: swap_xy
  optical_role:
    filter: GU
    survey: spectroscopic
@@ -365,7 +393,8 @@ detectors:
  placement:
    x_mm: -251.5
    y_mm: 101.3
    rotation_deg: 1.0
    rotation_deg: -91.0
    axis_mapping: swap_xy
  optical_role:
    filter: GV
    survey: spectroscopic
@@ -377,103 +406,112 @@ detectors:
  placement:
    x_mm: -251.5
    y_mm: 202.6
    rotation_deg: 1.0
    rotation_deg: -91.0
    axis_mapping: swap_xy
  optical_role:
    filter: GI
    survey: spectroscopic
- id: '31'
  name: FGS1A-D1
  detector_type: fgs_cmos_v1
  readout_mode: fgs_16ch_legacy
  readout_mode: fgs_16ch_native
  calibration_profile: fgs_nominal_v1
  placement:
    x_mm: -325.395
    y_mm: -47.82
    x_mm: -47.82
    y_mm: 325.395
    rotation_deg: 0.0
    axis_mapping: swap_xy
  optical_role:
    filter: FGS
    survey: guiding
- id: '32'
  name: FGS1A-D2
  detector_type: fgs_cmos_v1
  readout_mode: fgs_16ch_legacy
  readout_mode: fgs_16ch_native
  calibration_profile: fgs_nominal_v1
  placement:
    x_mm: -325.395
    y_mm: 22.7
    x_mm: 22.7
    y_mm: 325.395
    rotation_deg: 0.0
    axis_mapping: swap_xy
  optical_role:
    filter: FGS
    survey: guiding
- id: '33'
  name: FGS1B-D1
  detector_type: fgs_cmos_v1
  readout_mode: fgs_16ch_legacy
  readout_mode: fgs_16ch_native
  calibration_profile: fgs_nominal_v1
  placement:
    x_mm: -325.395
    y_mm: 93.195
    x_mm: 93.195
    y_mm: 325.395
    rotation_deg: 0.0
    axis_mapping: swap_xy
  optical_role:
    filter: FGS
    survey: guiding
- id: '34'
  name: FGS1B-D2
  detector_type: fgs_cmos_v1
  readout_mode: fgs_16ch_legacy
  readout_mode: fgs_16ch_native
  calibration_profile: fgs_nominal_v1
  placement:
    x_mm: -325.395
    y_mm: 163.69
    x_mm: 163.69
    y_mm: 325.395
    rotation_deg: 0.0
    axis_mapping: swap_xy
  optical_role:
    filter: FGS
    survey: guiding
- id: '35'
  name: FGS2A-D1
  detector_type: fgs_cmos_v1
  readout_mode: fgs_16ch_legacy
  readout_mode: fgs_16ch_native
  calibration_profile: fgs_nominal_v1
  placement:
    x_mm: 325.395
    y_mm: 47.82
    x_mm: 47.82
    y_mm: -325.395
    rotation_deg: 0.0
    axis_mapping: swap_xy
  optical_role:
    filter: FGS
    survey: guiding
- id: '36'
  name: FGS2A-D2
  detector_type: fgs_cmos_v1
  readout_mode: fgs_16ch_legacy
  readout_mode: fgs_16ch_native
  calibration_profile: fgs_nominal_v1
  placement:
    x_mm: 325.395
    y_mm: -22.7
    x_mm: -22.7
    y_mm: -325.395
    rotation_deg: 0.0
    axis_mapping: swap_xy
  optical_role:
    filter: FGS
    survey: guiding
- id: '37'
  name: FGS2B-D1
  detector_type: fgs_cmos_v1
  readout_mode: fgs_16ch_legacy
  readout_mode: fgs_16ch_native
  calibration_profile: fgs_nominal_v1
  placement:
    x_mm: 325.395
    y_mm: -93.195
    x_mm: -93.195
    y_mm: -325.395
    rotation_deg: 0.0
    axis_mapping: swap_xy
  optical_role:
    filter: FGS
    survey: guiding
- id: '38'
  name: FGS2B-D2
  detector_type: fgs_cmos_v1
  readout_mode: fgs_16ch_legacy
  readout_mode: fgs_16ch_native
  calibration_profile: fgs_nominal_v1
  placement:
    x_mm: 325.395
    y_mm: -163.69
    x_mm: -163.69
    y_mm: -325.395
    rotation_deg: 0.0
    axis_mapping: swap_xy
  optical_role:
    filter: FGS
    survey: guiding
+128 −18
Original line number Diff line number Diff line
@@ -45,42 +45,42 @@ readout_modes:
        detector_to_raw: flip_x
        scan: *science_scan
        raw_mosaic_bbox: {x0: 8750, y0: 0, width: 1250, height: 4700}
      - id: CH09
      - id: CH16
        detector_bbox: {x0: 0, y0: 4616, width: 1152, height: 4616}
        detector_to_raw: flip_y
        scan: *science_scan
        raw_mosaic_bbox: {x0: 0, y0: 4700, width: 1250, height: 4700}
      - id: CH10
      - id: CH15
        detector_bbox: {x0: 1152, y0: 4616, width: 1152, height: 4616}
        detector_to_raw: flip_y
        scan: *science_scan
        raw_mosaic_bbox: {x0: 1250, y0: 4700, width: 1250, height: 4700}
      - id: CH11
      - id: CH14
        detector_bbox: {x0: 2304, y0: 4616, width: 1152, height: 4616}
        detector_to_raw: flip_y
        scan: *science_scan
        raw_mosaic_bbox: {x0: 2500, y0: 4700, width: 1250, height: 4700}
      - id: CH12
      - id: CH13
        detector_bbox: {x0: 3456, y0: 4616, width: 1152, height: 4616}
        detector_to_raw: flip_y
        scan: *science_scan
        raw_mosaic_bbox: {x0: 3750, y0: 4700, width: 1250, height: 4700}
      - id: CH13
      - id: CH12
        detector_bbox: {x0: 4608, y0: 4616, width: 1152, height: 4616}
        detector_to_raw: rotate_180
        scan: *science_scan
        raw_mosaic_bbox: {x0: 5000, y0: 4700, width: 1250, height: 4700}
      - id: CH14
      - id: CH11
        detector_bbox: {x0: 5760, y0: 4616, width: 1152, height: 4616}
        detector_to_raw: rotate_180
        scan: *science_scan
        raw_mosaic_bbox: {x0: 6250, y0: 4700, width: 1250, height: 4700}
      - id: CH15
      - id: CH10
        detector_bbox: {x0: 6912, y0: 4616, width: 1152, height: 4616}
        detector_to_raw: rotate_180
        scan: *science_scan
        raw_mosaic_bbox: {x0: 7500, y0: 4700, width: 1250, height: 4700}
      - id: CH16
      - id: CH09
        detector_bbox: {x0: 8064, y0: 4616, width: 1152, height: 4616}
        detector_to_raw: rotate_180
        scan: *science_scan
@@ -88,11 +88,11 @@ readout_modes:
    raw_output:
      layout: single_mosaic
      mosaic_shape: {columns: 10000, rows: 9400}
      channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09]
      channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH09, CH10, CH11, CH12, CH13, CH14, CH15, CH16]
    formatted_output:
      layout: single_mosaic
      mosaic_shape: {columns: 20000, rows: 4700}
      channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09]
      channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH09, CH10, CH11, CH12, CH13, CH14, CH15, CH16]
      channel_placements:
        CH01: {x0: 0, y0: 0, width: 1250, height: 4700}
        CH02: {x0: 1250, y0: 0, width: 1250, height: 4700}
@@ -102,14 +102,14 @@ readout_modes:
        CH06: {x0: 6250, y0: 0, width: 1250, height: 4700}
        CH07: {x0: 7500, y0: 0, width: 1250, height: 4700}
        CH08: {x0: 8750, y0: 0, width: 1250, height: 4700}
        CH16: {x0: 10000, y0: 0, width: 1250, height: 4700}
        CH15: {x0: 11250, y0: 0, width: 1250, height: 4700}
        CH14: {x0: 12500, y0: 0, width: 1250, height: 4700}
        CH13: {x0: 13750, y0: 0, width: 1250, height: 4700}
        CH12: {x0: 15000, y0: 0, width: 1250, height: 4700}
        CH11: {x0: 16250, y0: 0, width: 1250, height: 4700}
        CH10: {x0: 17500, y0: 0, width: 1250, height: 4700}
        CH09: {x0: 18750, y0: 0, width: 1250, height: 4700}
        CH09: {x0: 10000, y0: 0, width: 1250, height: 4700}
        CH10: {x0: 11250, y0: 0, width: 1250, height: 4700}
        CH11: {x0: 12500, y0: 0, width: 1250, height: 4700}
        CH12: {x0: 13750, y0: 0, width: 1250, height: 4700}
        CH13: {x0: 15000, y0: 0, width: 1250, height: 4700}
        CH14: {x0: 16250, y0: 0, width: 1250, height: 4700}
        CH15: {x0: 17500, y0: 0, width: 1250, height: 4700}
        CH16: {x0: 18750, y0: 0, width: 1250, height: 4700}

  fgs_16ch_legacy:
    detector_family: fgs_cmos
@@ -220,3 +220,113 @@ readout_modes:
        CH11: {x0: 19578, y0: 0, width: 1506, height: 3924}
        CH10: {x0: 21084, y0: 0, width: 1506, height: 3924}
        CH09: {x0: 22590, y0: 0, width: 1506, height: 3924}

  fgs_16ch_native:
    detector_family: fgs_cmos
    require_full_active_coverage: true
    channels:
      - id: CH01
        detector_bbox: {x0: 0, y0: 0, width: 1408, height: 3840}
        detector_to_raw: identity
        scan: &fgs_native_scan {serial_prescan: 27, serial_overscan: 71, parallel_prescan: 0, parallel_overscan: 84}
        raw_mosaic_bbox: {x0: 0, y0: 0, width: 1506, height: 3924}
      - id: CH02
        detector_bbox: {x0: 1408, y0: 0, width: 1408, height: 3840}
        detector_to_raw: identity
        scan: *fgs_native_scan
        raw_mosaic_bbox: {x0: 1506, y0: 0, width: 1506, height: 3924}
      - id: CH03
        detector_bbox: {x0: 2816, y0: 0, width: 1408, height: 3840}
        detector_to_raw: identity
        scan: *fgs_native_scan
        raw_mosaic_bbox: {x0: 3012, y0: 0, width: 1506, height: 3924}
      - id: CH04
        detector_bbox: {x0: 4224, y0: 0, width: 1408, height: 3840}
        detector_to_raw: identity
        scan: *fgs_native_scan
        raw_mosaic_bbox: {x0: 4518, y0: 0, width: 1506, height: 3924}
      - id: CH05
        detector_bbox: {x0: 5632, y0: 0, width: 1408, height: 3840}
        detector_to_raw: flip_x
        scan: *fgs_native_scan
        raw_mosaic_bbox: {x0: 6024, y0: 0, width: 1506, height: 3924}
      - id: CH06
        detector_bbox: {x0: 7040, y0: 0, width: 1408, height: 3840}
        detector_to_raw: flip_x
        scan: *fgs_native_scan
        raw_mosaic_bbox: {x0: 7530, y0: 0, width: 1506, height: 3924}
      - id: CH07
        detector_bbox: {x0: 8448, y0: 0, width: 1408, height: 3840}
        detector_to_raw: flip_x
        scan: *fgs_native_scan
        raw_mosaic_bbox: {x0: 9036, y0: 0, width: 1506, height: 3924}
      - id: CH08
        detector_bbox: {x0: 9856, y0: 0, width: 1408, height: 3840}
        detector_to_raw: flip_x
        scan: *fgs_native_scan
        raw_mosaic_bbox: {x0: 10542, y0: 0, width: 1506, height: 3924}
      - id: CH16
        detector_bbox: {x0: 0, y0: 3840, width: 1408, height: 3840}
        detector_to_raw: flip_y
        scan: *fgs_native_scan
        raw_mosaic_bbox: {x0: 0, y0: 3924, width: 1506, height: 3924}
      - id: CH15
        detector_bbox: {x0: 1408, y0: 3840, width: 1408, height: 3840}
        detector_to_raw: flip_y
        scan: *fgs_native_scan
        raw_mosaic_bbox: {x0: 1506, y0: 3924, width: 1506, height: 3924}
      - id: CH14
        detector_bbox: {x0: 2816, y0: 3840, width: 1408, height: 3840}
        detector_to_raw: flip_y
        scan: *fgs_native_scan
        raw_mosaic_bbox: {x0: 3012, y0: 3924, width: 1506, height: 3924}
      - id: CH13
        detector_bbox: {x0: 4224, y0: 3840, width: 1408, height: 3840}
        detector_to_raw: flip_y
        scan: *fgs_native_scan
        raw_mosaic_bbox: {x0: 4518, y0: 3924, width: 1506, height: 3924}
      - id: CH12
        detector_bbox: {x0: 5632, y0: 3840, width: 1408, height: 3840}
        detector_to_raw: rotate_180
        scan: *fgs_native_scan
        raw_mosaic_bbox: {x0: 6024, y0: 3924, width: 1506, height: 3924}
      - id: CH11
        detector_bbox: {x0: 7040, y0: 3840, width: 1408, height: 3840}
        detector_to_raw: rotate_180
        scan: *fgs_native_scan
        raw_mosaic_bbox: {x0: 7530, y0: 3924, width: 1506, height: 3924}
      - id: CH10
        detector_bbox: {x0: 8448, y0: 3840, width: 1408, height: 3840}
        detector_to_raw: rotate_180
        scan: *fgs_native_scan
        raw_mosaic_bbox: {x0: 9036, y0: 3924, width: 1506, height: 3924}
      - id: CH09
        detector_bbox: {x0: 9856, y0: 3840, width: 1408, height: 3840}
        detector_to_raw: rotate_180
        scan: *fgs_native_scan
        raw_mosaic_bbox: {x0: 10542, y0: 3924, width: 1506, height: 3924}
    raw_output:
      layout: single_mosaic
      mosaic_shape: {columns: 12048, rows: 7848}
      channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH09, CH10, CH11, CH12, CH13, CH14, CH15, CH16]
    formatted_output:
      layout: single_mosaic
      mosaic_shape: {columns: 24096, rows: 3924}
      channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH09, CH10, CH11, CH12, CH13, CH14, CH15, CH16]
      channel_placements:
        CH01: {x0: 0, y0: 0, width: 1506, height: 3924}
        CH02: {x0: 1506, y0: 0, width: 1506, height: 3924}
        CH03: {x0: 3012, y0: 0, width: 1506, height: 3924}
        CH04: {x0: 4518, y0: 0, width: 1506, height: 3924}
        CH05: {x0: 6024, y0: 0, width: 1506, height: 3924}
        CH06: {x0: 7530, y0: 0, width: 1506, height: 3924}
        CH07: {x0: 9036, y0: 0, width: 1506, height: 3924}
        CH08: {x0: 10542, y0: 0, width: 1506, height: 3924}
        CH09: {x0: 12048, y0: 0, width: 1506, height: 3924}
        CH10: {x0: 13554, y0: 0, width: 1506, height: 3924}
        CH11: {x0: 15060, y0: 0, width: 1506, height: 3924}
        CH12: {x0: 16566, y0: 0, width: 1506, height: 3924}
        CH13: {x0: 18072, y0: 0, width: 1506, height: 3924}
        CH14: {x0: 19578, y0: 0, width: 1506, height: 3924}
        CH15: {x0: 21084, y0: 0, width: 1506, height: 3924}
        CH16: {x0: 22590, y0: 0, width: 1506, height: 3924}
Loading