l1_detector_guidewindow-1.0.0

Level 1 Detector Guide Star Window Information

Outline

Schema Definitions

This type is an object with the following properties:

  • meta

    objectRequired

    This node must validate against all of the following:

    • This type is an object with the following properties:

      • instrument

        asdf://stsci.edu/datamodels/roman/tags/wfi_mode-1.0.0Required

        WFI Observing Configuration

      • fgs_modes_used

        arrayRequired

        FGS Guiding Modes

        List of unique FGS guiding modes used during the guide window exposure.

        No length restriction

        Items in the array are restricted to the following types:

        string

        Maximum length: 20

        Only the following values are valid for this node:

        • NOT_CONFIGURED

        • STANDBY

        • WIM_ACQ_VW

        • WIM_ACQ_NA

        • WIM_TRK

        • WIM_TRK_S

        • WSM_ACQ_HC

        • WSM_ACQ_VC

        • WSM_TRK

        • WIM_DFC

      • acq_ma_table_id

        stringRequired

        Acquisition MA table ID

        Unique ID for the guide window MA table used during acquisition.

        Maximum length: 20

      • acq_gw_cycles_per_sci_read

        integerRequired

        Acquisition Cycles per Read

        Number of guide window pedestal and signal pairs per full frame read during acquisition.

      • acq_pedestal_resultant_exp_time

        numberRequired

        Acquisition Pedestal Effective Exposure Time

        Effective exposure time for each acquisition pedestal guide window resultant in seconds.

      • acq_signal_resultant_exp_time

        numberRequired

        Acquisition Signal Effective Exposure Time

        Effective exposure time for each acquisition signal guide window resultant in seconds.

      • track_ma_table_id

        stringRequired

        Track MA table ID

        Unique ID for the guide window MA table used during tracking.

        Maximum length: 20

      • track_gw_cycles_per_sci_read

        integerRequired

        Track Cycles per Read

        Number of guide window pedestal and signal pairs per full frame read during tracking.

      • track_pedestal_resultant_exp_time

        numberRequired

        Track Pedestal Effective Exposure Time

        Effective exposure time for each tracking pedestal guide window resultant in seconds.

      • track_signal_resultant_exp_time

        numberRequired

        Track Signal Effective Exposure Time

        Effective exposure time for each tracking signal guide window resultant in seconds.

      • guide_star_acq_num

        integerRequired

        Guide Star Acquisition Number

        Guide star acquisition number (1-9) for the guide window exposure.

      • guide_window_id

        stringRequired

        Guide Window ID

        A unique identification number of the guide window. This identifier combines the visit identifier and guide star acquisition number, and is set in the visit information uplinked to the observatory. As the number may be zero-padded, this value is saved as a string. See technical report Roman-STScI-000193 “Roman Programmatic Data Identification” for more information.

        Maximum length: 120

      • avg_face_filename

        stringRequired

        Averaged FACE Filename

        Filename of the guide window L1 file containing the averaged FACE fitting data for this GW exposure ID.

        Maximum length: 120

      • edge_acq_ma_table_id

        string

        Edge Acquisition MA table ID

        Unique ID for the guide window MA table used during edge acquisition.

        Maximum length: 20

      • edge_acq_gw_cycles_per_sci_read

        integer

        Edge Acquisition Cycles per Read

        Number of guide window pedestal and signal pairs per full frame read during edge acquisition.

      • edge_acq_pedestal_resultant_exp_time

        number

        Edge Acquisition Pedestal Effective Exposure Time

        Effective exposure time for each edge acquisition pedestal guide window resultant in seconds.

      • edge_acq_signal_resultant_exp_time

        number

        Edge Acquisition Signal Effective Exposure Time

        Effective exposure time for each edge acquisition signal guide window resultant in seconds.

      • wsm_edge_used

        string

        Averaged FACE Filename

        Spectral edge used for guiding with the prism or grism. Either “red” or “blue”.

        Maximum length: 5

        Only the following values are valid for this node:

        • blue

        • red

      • guide_window

        objectRequired

        This type is an object with the following properties:

        • min_acq_xstart

          integerRequired

          Minimum Acquisition X Coord

          Minimal x science coordinate used in the acquisition guide window resultants.

        • min_acq_ystart

          integerRequired

          Minimum Acquisition Y Coord

          Minimal y science coordinate used in the acquisition guide window resultants.

        • max_acq_xstop

          integerRequired

          Maximum Acquisition X Coord

          Maximal x science coordinate used in the acquisition guide window resultants.

        • max_acq_ystop

          integerRequired

          Maximum Acquisition Y Coord

          Maximal y science coordinate used in the acquisition guide window resultants.

        • acq_xsize

          integerRequired

          Acquisition X Size

          Size in the x direction of the acquisition guide window.

        • acq_ysize

          integerRequired

          Acquisition Y Size

          Size in the y direction of the acquisition guide window.

        • min_track_xstart

          integerRequired

          Minimum Acquisition X Coord

          Minimal x science coordinate used in the track guide window resultants.

        • min_track_ystart

          integerRequired

          Minimum Acquisition Y Coord

          Minimal y science coordinate used in the track guide window resultants.

        • max_track_xstop

          integerRequired

          Maximum Acquisition X Coord

          Maximal x science coordinate used in the track guide window resultants.

        • max_track_ystop

          integerRequired

          Maximum Acquisition Y Coord

          Maximal y science coordinate used in the track guide window resultants.

        • track_xsize

          integerRequired

          Acquisition X Size

          Size in the x direction of the track guide window.

        • track_ysize

          integerRequired

          Acquisition Y Size

          Size in the y direction of the track guide window.

        • min_edge_acq_xstart

          integer

          Minimum Edge Acquisition X Coord

          Minimal x science coordinate used in the edge acquisition guide window resultants.

        • min_edge_acq_ystart

          integer

          Minimum Edge Acquisition Y Coord

          Minimal y science coordinate used in the edge acquisition guide window resultants.

        • max_edge_acq_xstop

          integer

          Maximum Edge Acquisition X Coord

          Maximal x science coordinate used in the acquisition guide window resultants.

        • max_edge_acq_ystop

          integer

          Maximum Edge Acquisition Y Coord

          Maximal y science coordinate used in the edge acquisition guide window resultants.

        • edge_acq_xsize

          integer

          Edge Acquisition X Size

          Size in the x direction of the edge acquisition guide window.

        • edge_acq_ysize

          integer

          Edge Acquisition Y Size

          Size in the y direction of the edge acquisition guide window.

      • guide_star

        objectRequired

        This type is an object with the following properties:

        • gsc_id

          stringRequired

          Guide Star Catalog ID

          10 character, base 36 number identifying celestial objects included in Guide Star Catalog II; e.g., N5R2005564 and S7ZD014640.

          Maximum length: 11

        • predicted_ra

          numberRequired

          Right Ascension (deg)

          Right Ascension of the star corrected for proper motion to the start of the scheduled time span of the visit in degrees.

        • predicted_dec

          numberRequired

          Declination (deg)

          Declination of the star corrected for proper motion to the start of the scheduled time span of the visit in degrees.

        • gaia_parallax

          numberRequired

          Gaia Parallax

          Parallax as measured by Gaia DR 3 and reported in the Guide Star Catalog.

        • ra_pm

          numberRequired

          Proper Motion Right Ascension

          Right ascension component of star’s proper motion from the Guide Star Catalog in arcseconds/year.

        • dec_pm

          numberRequired

          Proper Motion Declination

          Declination component of star’s proper motion from the Guide Star Catalog in arcseconds/year.

        • predicted_fgs_mag

          numberRequired

          Expected FGS Magnitude

          Expected FGS magnitude for the guide star in the detector.

        • predicted_fgs_bright_mag

          numberRequired

          Brightest Expected FGS Magnitude

          Brightest expected FGS magnitude for the guide star in the detector.

        • predicted_fgs_faint_mag

          numberRequired

          Faintest Expected FGS Magnitude

          Faintest expected FGS magnitude for the guide star in the detector.

        • predicted_count_rate

          numberRequired

          Expected Count Rate

          Expected count rate of the guide star in the detector.

        • predicted_x

          numberRequired

          Expected X Coord

          Expected x coordinate in the science coordinate system.

        • predicted_y

          numberRequired

          Expected Y Coord

          Expected y coordinate in the science coordinate system.

        • pseudo_star_flag

          stringRequired

          Pseudo Star Flag

          Set to Y when a pseudo star is used instead of a real star from the Guide Star Catalog. Set to N for a real star.

          Maximum length: 1

          Only the following values are valid for this node:

          • Y

          • N

  • amp33

    objectRequired

    Guide Window Amplifier 33 Reference Pixel Information

    Guide Window Amplifier 33 Reference Pixel Information

    This type is an object with the following properties:

    • amp33_track_pedestals

      tag:stsci.edu:asdf/core/ndarray-1.*

      Pedestal Track Amplifier 33 Readouts (DN)

      3D array containing the 33rd amplifier readouts (e.g. reference pixels) during tracking pedestal resultants.

    • amp33_track_signals

      tag:stsci.edu:asdf/core/ndarray-1.*

      Signal Track Amplifier 33 Readouts (DN)

      3D array containing the 33rd amplifier readouts (e.g. reference pixels) during tracking signal resultants.

    • amp33_acq_pedestals

      tag:stsci.edu:asdf/core/ndarray-1.*

      Pedestal Amplifier 33 Readouts (DN)

      3D array containing the 33rd amplifier readouts (e.g. reference pixels) during acquisition pedestal resultants.

    • amp33_acq_signals

      tag:stsci.edu:asdf/core/ndarray-1.*

      Signal Amplifier 33 Readouts (DN)

      3D array containing the 33rd amplifier readouts (e.g. reference pixels) during acquisition signal resultants.

    • amp33_edge_acq_pedestals

      tag:stsci.edu:asdf/core/ndarray-1.*

      Pedestal Edge Amplifier 33 Readouts (DN)

      3D array containing the 33rd amplifier readouts (e.g. reference pixels) during the edge acquisition pedestal resultants.

    • amp33_edge_acq_signals

      tag:stsci.edu:asdf/core/ndarray-1.*

      Signal Edge Amplifier 33 Readouts (DN)

      3D array containing the 33rd amplifier readouts (e.g. reference pixels) during the edge acquisition signal resultants.

  • centroid

    objectRequired

    Centroid Data

    Centroid Data

    This type is an object with the following properties:

    • acq_centroids

      object

      Acquisition Centroids

      3D array containing the X,Y centroid locations in science coordinates in each GW acquisition resultant difference (pedestal resultant - signal resultant). Up to 5 sets of centroids can occur for the same resultant difference and are filled with NaN if not provided in the downlinked data packets. This quantity is set to None for Dark exposures when no centroids are taken.

      This node must validate against any of the following:

    • acq_centroid_errs

      object

      Acquisition Centroid Errors

      3D array containing the 2nd moment errors of the GW acquisition difference centroids (XX, YY, XY). Up to 5 sets of centroid errors can occur for the same resultant difference and are filled with NaN if not provided in the downlinked data packets. This quantity is set to None for Dark exposures when no centroids are taken.

      This node must validate against any of the following:

    • acq_centroid_quality

      tag:stsci.edu:asdf/core/ndarray-1.*

      Acquisition Centroid Quality

      2D array containing strings that describe the quality of the acquisition centroids. An empty string indicated the centroid was not provided in the downlinked data packets. For further descriptions of the, please consult the Roman Documentation page. This quantity is set to None for Dark exposures when no centroids are taken.

    • acq_centroid_times

      array

      Acquisition Centroid Times

      1D array of times associated with the centroid of each acquisition resultant difference. The centroid times should lie between the pedestal and signal resultant times. This quantity is set to None for Dark exposures when no centroids are taken.

      No length restriction

      Items in the array must be any of the following types:

    • track_centroids

      object

      Track Centroids

      2D array containing the X,Y centroid locations in science coordinates in each GW tracking resultant difference (pedestal resultant - signal resultant). This quantity is set to None for Dark exposures when no centroids are taken.

      This node must validate against any of the following:

    • track_centroid_errs

      object

      Track Centroid Errors

      2D array containing the 2nd moment errors of the GW tracking difference centroids (XX, YY, XY). This quantity is set to None for Dark exposures when no centroids are taken.

      This node must validate against any of the following:

    • track_centroid_quality

      object

      Track Centroid Quality

      1D array containing strings that describe the quality of the tracking centroids. For further descriptions of the, please consult the Roman Documentation page. This quantity is set to None for Dark exposures when no centroids are taken.

      This node must validate against any of the following:

    • track_centroid_times

      array

      Track Centroid Times

      1D array of times associated with the centroid of each tracking resultant difference. The centroid times should lie between the pedestal and signal resultant times. This quantity is set to None for Dark exposures when no centroids are taken.

      No length restriction

      Items in the array must be any of the following types:

    • edge_acq_centroids

      object

      Edge Acquisition Centroids

      2D array containing the X,Y centroid locations in science coordinates in each GW edge acquisition resultant difference (pedestal resultant - signal resultant) (only used with WSM). This quantity is set to None for Dark exposures when no centroids are taken.

      This node must validate against any of the following:

    • edge_acq_centroid_errs

      object

      Edge Acquisition Centroid Errors

      2D array containing the 2nd moment errors of the GW edge acquisition difference centroids (XX, YY, XY) (only used with WSM). This quantity is set to None for Dark exposures when no centroids are taken.

      This node must validate against any of the following:

    • edge_acq_centroid_quality

      object

      Edge Acquisition Centroid Quality

      1D array containing strings that describe the quality of the edge acquisition centroids (only used with WSM). For further descriptions of the, please consult the Roman Documentation page. This quantity is set to None for Dark exposures when no centroids are taken.

      This node must validate against any of the following:

    • edge_acq_centroid_times

      array

      Edge Acquisition Centroid Times

      1D array of times associated with the centroid of each edge acquisition resultant difference (only used with WSM). The centroid times should lie between the pedestal and signal resultant times. This quantity is set to None for Dark exposures when no centroids are taken.

      No length restriction

      Items in the array must be any of the following types:

  • acq_data

    objectRequired

    Acquisition Guide Window Data

    All data received from the acquisition guide window data packets

    This type is an object with the following properties:

    • pedestal_resultants

      tag:stsci.edu:asdf/core/ndarray-1.*

      Pedestal Resultants (DN)

      3D array containing every pedestal resultant’s pixel values.

    • signal_resultants

      tag:stsci.edu:asdf/core/ndarray-1.*

      Signal Resultants (DN)

      3D array containing every signal resultant’s pixel values.

    • lower_left_corners

      object

      Lower Left Corners

      2D array containing all the lower left corners of each guide window resultant pair in science coordinates (x_start, y_start).

      This node has no type definition (unrestricted)
    • upper_right_corners

      object

      Upper Right Corners

      2D array containing all the upper right corners of each guide window resultant pair in science coordinates (x_stop, y_stop).

      This node has no type definition (unrestricted)
    • pixel_offsets

      object

      Pixel Offsets (DN)

      1D array of constants added to all guide window pixel values in the resultants or a single integer if all values are equal.

      This node must validate against any of the following:

    • reset_impacted_pairs

      object

      Reset Impacted Pairs

      1D boolean array indicating which pedestal and signal pairs were impacted by reset reads. As reset reads execute, the reset and read individual pixels in a linear fashion across the full detector. Because full frame rows are readout between the pedestal and signal resultants, during a reset read some guide window resultants are impacted by the reset sweeping across those rows of the detector. This flag highlights which guide window resultant pairs are impacted by these resets.

      This node has no type definition (unrestricted)
    • reset_read_flag

      object

      Reset Read Flag

      1D array of booleans indicating which guide window resultant pairs are read out during a reset. True values correspond to pairs taken during reset reads, False values correspond to pairs taken during normal frame reads.

      This node has no type definition (unrestricted)
    • pedestal_times

      array

      Pedestal Times (UTC)

      1D array of astropy time objects containing the latched MET times in the UTC standard associated with the pedestal resultants.

      No length restriction

      Items in the array are restricted to the following types:

    • signal_times

      array

      Signal Times (UTC)

      1D array of astropy time objects containing the latched MET times in the UTC standard associated with the signal resultants.

      No length restriction

      Items in the array are restricted to the following types:

    • sci_data_packet_counts

      object

      Science Data Packet Counts

      2D array of the science data packet counts for the matched pedestal and signal resultants. The span between the pedestal and the signal values indicate which full frame row indices were read out during the guide window exposure.

      This node has no type definition (unrestricted)
    • sce_status_flag

      object

      SCE Status Flag

      Either a 2D array containing the SCE status for each pedestal and signal resultant or a single integer if all flags are equal. 1 indicates an internal error occurred during the ACADIA processing.

      This node must validate against any of the following:

    • gw_resultant_err_flag

      object

      Guide Window Resultant Error Flag

      Either a 2D array containing the guide window resultant error flag for each pedestal and signal resultant or a single integer if all flags are equal. 1 indicates an internal error in the SCU occurred while processing the GW resultant. See FPGA error registers for more information.

      This node must validate against any of the following:

    • min_bind_flag

      object

      Minimum Binding Flag

      Either a 2D array containing the binding minimum flag for each pedestal and signal resultant or a single integer if all flags are equal. 1 indicates that any negative pixel values within the resultant were bound to 0.

      This node must validate against any of the following:

    • max_bind_flag

      object

      Maximum Binding Flag

      Either a 2D array containing the binding maximum flag for each pedestal and signal resultant or a single integer if all flags are equal. 1 indicates that any positive pixel values within the resultant were bound to 65535.

      This node must validate against any of the following:

  • track_data

    objectRequired

    Tracking Guide Window Data

    All data received from the tracking guide window data packets

    This type is an object with the following properties:

    • pedestal_resultants

      tag:stsci.edu:asdf/core/ndarray-1.*

      Pedestal Resultants (DN)

      3D array containing every pedestal resultant’s pixel values.

    • signal_resultants

      tag:stsci.edu:asdf/core/ndarray-1.*

      Signal Resultants (DN)

      3D array containing every signal resultant’s pixel values.

    • lower_left_corners

      object

      Lower Left Corners

      2D array containing all the lower left corners of each guide window resultant pair in science coordinates (x_start, y_start).

      This node has no type definition (unrestricted)
    • upper_right_corners

      object

      Upper Right Corners

      2D array containing all the upper right corners of each guide window resultant pair in science coordinates (x_stop, y_stop).

      This node has no type definition (unrestricted)
    • pixel_offsets

      object

      Pixel Offsets (DN)

      1D array of constants added to all guide window pixel values in the resultants or a single integer if all values are equal.

      This node must validate against any of the following:

    • reset_impacted_pairs

      object

      Reset Impacted Pairs

      1D boolean array indicating which pedestal and signal pairs were impacted by reset reads. As reset reads execute, the reset and read individual pixels in a linear fashion across the full detector. Because full frame rows are readout between the pedestal and signal resultants, during a reset read some guide window resultants are impacted by the reset sweeping across those rows of the detector. This flag highlights which guide window resultant pairs are impacted by these resets.

      This node has no type definition (unrestricted)
    • reset_read_flag

      object

      Reset Read Flag

      1D array of booleans indicating which guide window resultant pairs are read out during a reset. True values correspond to pairs taken during reset reads, False values correspond to pairs taken during normal frame reads.

      This node has no type definition (unrestricted)
    • pedestal_times

      array

      Pedestal Times (UTC)

      1D array of astropy time objects containing the latched MET times in the UTC standard associated with the pedestal resultants.

      No length restriction

      Items in the array are restricted to the following types:

    • signal_times

      array

      Signal Times (UTC)

      1D array of astropy time objects containing the latched MET times in the UTC standard associated with the signal resultants.

      No length restriction

      Items in the array are restricted to the following types:

    • sci_data_packet_counts

      object

      Science Data Packet Counts

      2D array of the science data packet counts for the matched pedestal and signal resultants. The span between the pedestal and the signal values indicate which full frame row indices were read out during the guide window exposure.

      This node has no type definition (unrestricted)
    • sce_status_flag

      object

      SCE Status Flag

      Either a 2D array containing the SCE status for each pedestal and signal resultant or a single integer if all flags are equal. 1 indicates an internal error occurred during the ACADIA processing.

      This node must validate against any of the following:

    • gw_resultant_err_flag

      object

      Guide Window Resultant Error Flag

      Either a 2D array containing the guide window resultant error flag for each pedestal and signal resultant or a single integer if all flags are equal. 1 indicates an internal error in the SCU occurred while processing the GW resultant. See FPGA error registers for more information.

      This node must validate against any of the following:

    • min_bind_flag

      object

      Minimum Binding Flag

      Either a 2D array containing the binding minimum flag for each pedestal and signal resultant or a single integer if all flags are equal. 1 indicates that any negative pixel values within the resultant were bound to 0.

      This node must validate against any of the following:

    • max_bind_flag

      object

      Maximum Binding Flag

      Either a 2D array containing the binding maximum flag for each pedestal and signal resultant or a single integer if all flags are equal. 1 indicates that any positive pixel values within the resultant were bound to 65535.

      This node must validate against any of the following:

    • exposure_mapping

      object

      Exposure Mapping

      1D array of signed integers with the same length as the tracking signal resultants. Positive integers correspond to the exposure number (single MA Table read). Negative integers correspond to the tracking reads between exposures.

      This node has no type definition (unrestricted)
  • edge_acq_data

    object

    Spectrum Edge Acquisition Guide Window Data

    All data received from the spectrum edge acquisition guide window data packets during WSM exposures. This secondary acquisition only occurs during spectroscopic observations.

    This type is an object with the following properties:

    • pedestal_resultants

      tag:stsci.edu:asdf/core/ndarray-1.*

      Pedestal Resultants (DN)

      3D array containing every pedestal resultant’s pixel values.

    • signal_resultants

      tag:stsci.edu:asdf/core/ndarray-1.*

      Signal Resultants (DN)

      3D array containing every signal resultant’s pixel values.

    • lower_left_corners

      object

      Lower Left Corners

      2D array containing all the lower left corners of each guide window resultant pair in science coordinates (x_start, y_start).

      This node has no type definition (unrestricted)
    • upper_right_corners

      object

      Upper Right Corners

      2D array containing all the upper right corners of each guide window resultant pair in science coordinates (x_stop, y_stop).

      This node has no type definition (unrestricted)
    • pixel_offsets

      object

      Pixel Offsets (DN)

      1D array of constants added to all guide window pixel values in the resultants or a single integer if all values are equal.

      This node must validate against any of the following:

    • reset_impacted_pairs

      object

      Reset Impacted Pairs

      1D boolean array indicating which pedestal and signal pairs were impacted by reset reads. As reset reads execute, the reset and read individual pixels in a linear fashion across the full detector. Because full frame rows are readout between the pedestal and signal resultants, during a reset read some guide window resultants are impacted by the reset sweeping across those rows of the detector. This flag highlights which guide window resultant pairs are impacted by these resets.

      This node has no type definition (unrestricted)
    • reset_read_flag

      object

      Reset Read Flag

      1D array of booleans indicating which guide window resultant pairs are read out during a reset. True values correspond to pairs taken during reset reads, False values correspond to pairs taken during normal frame reads.

      This node has no type definition (unrestricted)
    • pedestal_times

      array

      Pedestal Times (UTC)

      1D array of astropy time objects containing the latched MET times in the UTC standard associated with the pedestal resultants.

      No length restriction

      Items in the array are restricted to the following types:

    • signal_times

      array

      Signal Times (UTC)

      1D array of astropy time objects containing the latched MET times in the UTC standard associated with the signal resultants.

      No length restriction

      Items in the array are restricted to the following types:

    • sci_data_packet_counts

      object

      Science Data Packet Counts

      2D array of the science data packet counts for the matched pedestal and signal resultants. The span between the pedestal and the signal values indicate which full frame row indices were read out during the guide window exposure.

      This node has no type definition (unrestricted)
    • sce_status_flag

      object

      SCE Status Flag

      Either a 2D array containing the SCE status for each pedestal and signal resultant or a single integer if all flags are equal. 1 indicates an internal error occurred during the ACADIA processing.

      This node must validate against any of the following:

    • gw_resultant_err_flag

      object

      Guide Window Resultant Error Flag

      Either a 2D array containing the guide window resultant error flag for each pedestal and signal resultant or a single integer if all flags are equal. 1 indicates an internal error in the SCU occurred while processing the GW resultant. See FPGA error registers for more information.

      This node must validate against any of the following:

    • min_bind_flag

      object

      Minimum Binding Flag

      Either a 2D array containing the binding minimum flag for each pedestal and signal resultant or a single integer if all flags are equal. 1 indicates that any negative pixel values within the resultant were bound to 0.

      This node must validate against any of the following:

    • max_bind_flag

      object

      Maximum Binding Flag

      Either a 2D array containing the binding maximum flag for each pedestal and signal resultant or a single integer if all flags are equal. 1 indicates that any positive pixel values within the resultant were bound to 65535.

      This node must validate against any of the following:

Original Schema

%YAML 1.1
---
$schema: asdf://stsci.edu/datamodels/roman/schemas/rad_schema-1.0.0
id: asdf://stsci.edu/datamodels/roman/schemas/l1_detector_guidewindow-1.0.0

title: Level 1 Detector Guide Star Window Information

datamodel_name: L1DetectorGuidewindowModel

archive_meta: None

type: object
properties:
  meta:
    allOf:
      - $ref: asdf://stsci.edu/datamodels/roman/schemas/basic-1.0.0
      - type: object
        properties:
          instrument:
            title: WFI Observing Configuration
            tag: asdf://stsci.edu/datamodels/roman/tags/wfi_mode-1.0.0
          fgs_modes_used:
            title: FGS Guiding Modes
            description: |
              List of unique FGS guiding modes used during the guide window exposure.
            type: array
            items:
              type: string
              enum:
                [
                  "NOT_CONFIGURED",
                  "STANDBY",
                  "WIM_ACQ_VW",
                  "WIM_ACQ_NA",
                  "WIM_TRK",
                  "WIM_TRK_S",
                  "WSM_ACQ_HC",
                  "WSM_ACQ_VC",
                  "WSM_TRK",
                  "WIM_DFC",
                ]
              maxLength: 20
            sdf:
              special_processing: VALUE_REQUIRED
              source:
                origin: TBD
            archive_catalog:
              datatype: nvarchar(20)
              destination: [GuideWindow.gw_fgs_modes_used]
          acq_ma_table_id:
            title: Acquisition MA table ID
            description: |
              Unique ID for the guide window MA table used during acquisition.
            type: string
            maxLength: 20
          acq_gw_cycles_per_sci_read:
            title: Acquisition Cycles per Read
            description: |
              Number of guide window pedestal and signal pairs per full frame read
              during acquisition.
            type: integer
          acq_pedestal_resultant_exp_time:
            title: Acquisition Pedestal Effective Exposure Time
            description: |
              Effective exposure time for each acquisition pedestal guide window
              resultant in seconds.
            type: number
          acq_signal_resultant_exp_time:
            title: Acquisition Signal Effective Exposure Time
            description: |
              Effective exposure time for each acquisition signal guide window
              resultant in seconds.
            type: number
          track_ma_table_id:
            title: Track MA table ID
            description: |
              Unique ID for the guide window MA table used during tracking.
            type: string
            maxLength: 20
          track_gw_cycles_per_sci_read:
            title: Track Cycles per Read
            description: |
              Number of guide window pedestal and signal pairs per full frame
              read during tracking.
            type: integer
          track_pedestal_resultant_exp_time:
            title: Track Pedestal Effective Exposure Time
            description: |
              Effective exposure time for each tracking pedestal guide window
              resultant in seconds.
            type: number
          track_signal_resultant_exp_time:
            title: Track Signal Effective Exposure Time
            description: |
              Effective exposure time for each tracking signal guide window
              resultant in seconds.
            type: number
          guide_star_acq_num:
            title: Guide Star Acquisition Number
            description: |
              Guide star acquisition number (1-9) for the guide window exposure.
            type: integer
            sdf:
              special_processing: VALUE_REQUIRED
              source:
                origin: TBD
            archive_catalog:
              datatype: int
              destination: [GuideWindow.gw_guide_star_acq_num]
          guide_window_id:
            title: Guide Window ID
            description: |
              A unique identification number of the guide window. This identifier combines the
              visit identifier and guide star acquisition number, and is set in the visit information
              uplinked to the observatory. As the number may be zero-padded, this value is saved as
              a string. See technical report Roman-STScI-000193 "Roman Programmatic Data
              Identification" for more information.
            type: string
            maxLength: 120
            sdf:
              special_processing: VALUE_REQUIRED
              source:
                origin: TBD
            archive_catalog:
              datatype: nvarchar(120)
              destination: [GuideWindow.gw_guide_window_id]
          avg_face_filename:
            title: Averaged FACE Filename
            description: |
              Filename of the guide window L1 file containing the averaged
              FACE fitting data for this GW exposure ID.
            type: string
            maxLength: 120
          # Optional
          edge_acq_ma_table_id:
            title: Edge Acquisition MA table ID
            description: |
              Unique ID for the guide window MA table used during edge acquisition.
            type: string
            maxLength: 20
          edge_acq_gw_cycles_per_sci_read:
            title: Edge Acquisition Cycles per Read
            description: |
              Number of guide window pedestal and signal pairs per full frame read
              during edge acquisition.
            type: integer
          edge_acq_pedestal_resultant_exp_time:
            title: Edge Acquisition Pedestal Effective Exposure Time
            description: |
              Effective exposure time for each edge acquisition pedestal
              guide window resultant in seconds.
            type: number
          edge_acq_signal_resultant_exp_time:
            title: Edge Acquisition Signal Effective Exposure Time
            description: |
              Effective exposure time for each edge acquisition signal guide window
              resultant in seconds.
            type: number
          wsm_edge_used:
            title: Averaged FACE Filename
            description: |
              Spectral edge used for guiding with the prism or grism. Either "red" or "blue".
            type: string
            enum: ["blue", "red"]
            maxLength: 5
          guide_window:
            type: object
            properties:
              min_acq_xstart:
                title: Minimum Acquisition X Coord
                description: |
                  Minimal x science coordinate used in the acquisition guide window resultants.
                type: integer
              min_acq_ystart:
                title: Minimum Acquisition Y Coord
                description: |
                  Minimal y science coordinate used in the acquisition guide window resultants.
                type: integer
              max_acq_xstop:
                title: Maximum Acquisition X Coord
                description: |
                  Maximal x science coordinate used in the acquisition guide window resultants.
                type: integer
              max_acq_ystop:
                title: Maximum Acquisition Y Coord
                description: |
                  Maximal y science coordinate used in the acquisition guide window resultants.
                type: integer
              acq_xsize:
                title: Acquisition X Size
                description: |
                  Size in the x direction of the acquisition guide window.
                type: integer
              acq_ysize:
                title: Acquisition Y Size
                description: |
                  Size in the y direction of the acquisition guide window.
                type: integer
              min_track_xstart:
                title: Minimum Acquisition X Coord
                description: |
                  Minimal x science coordinate used in the track guide window resultants.
                type: integer
              min_track_ystart:
                title: Minimum Acquisition Y Coord
                description: |
                  Minimal y science coordinate used in the track guide window resultants.
                type: integer
              max_track_xstop:
                title: Maximum Acquisition X Coord
                description: |
                  Maximal x science coordinate used in the track guide window resultants.
                type: integer
              max_track_ystop:
                title: Maximum Acquisition Y Coord
                description: |
                  Maximal y science coordinate used in the track guide window resultants.
                type: integer
              track_xsize:
                title: Acquisition X Size
                description: |
                  Size in the x direction of the track guide window.
                type: integer
              track_ysize:
                title: Acquisition Y Size
                description: |
                  Size in the y direction of the track guide window.
                type: integer
              # Optional
              min_edge_acq_xstart:
                title: Minimum Edge Acquisition X Coord
                description: |
                  Minimal x science coordinate used in the edge acquisition guide window resultants.
                type: integer
              min_edge_acq_ystart:
                title: Minimum Edge Acquisition Y Coord
                description: |
                  Minimal y science coordinate used in the edge acquisition guide window resultants.
                type: integer
              max_edge_acq_xstop:
                title: Maximum Edge Acquisition X Coord
                description: |
                  Maximal x science coordinate used in the acquisition guide window resultants.
                type: integer
              max_edge_acq_ystop:
                title: Maximum Edge Acquisition Y Coord
                description: |
                  Maximal y science coordinate used in the edge acquisition guide window resultants.
                type: integer
              edge_acq_xsize:
                title: Edge Acquisition X Size
                description: |
                  Size in the x direction of the edge acquisition guide window.
                type: integer
              edge_acq_ysize:
                title: Edge Acquisition Y Size
                description: |
                  Size in the y direction of the edge acquisition guide window.
                type: integer
            required:
              [
                "min_acq_xstart",
                "min_acq_ystart",
                "max_acq_xstop",
                "max_acq_ystop",
                "acq_xsize",
                "acq_ysize",
                "min_track_xstart",
                "min_track_ystart",
                "max_track_xstop",
                "max_track_ystop",
                "track_xsize",
                "track_ysize",
              ]
          guide_star:
            type: object
            properties:
              gsc_id:
                title: Guide Star Catalog ID
                description: |
                  10 character, base 36 number identifying celestial objects included
                  in Guide Star Catalog II; e.g., N5R2005564 and S7ZD014640.
                type: string
                maxLength: 11
                sdf:
                  special_processing: VALUE_REQUIRED
                  source:
                    origin: TBD
                archive_catalog:
                  datatype: nvarchar(11)
                  destination: [GuideWindow.gw_gsc_id]
              predicted_ra:
                title: Right Ascension (deg)
                description: |
                  Right Ascension of the star corrected for proper motion to the
                  start of the scheduled time span of the visit in degrees.
                type: number
                sdf:
                  special_processing: VALUE_REQUIRED
                  source:
                    origin: TBD
                archive_catalog:
                  datatype: float
                  destination: [GuideWindow.gw_predicted_ra]
              predicted_dec:
                title: Declination (deg)
                description: |
                  Declination of the star corrected for proper motion to the start
                  of the scheduled time span of the visit in degrees.
                type: number
                sdf:
                  special_processing: VALUE_REQUIRED
                  source:
                    origin: TBD
                archive_catalog:
                  datatype: float
                  destination: [GuideWindow.gw_predicted_dec]
              gaia_parallax:
                title: Gaia Parallax
                description: |
                  Parallax as measured by Gaia DR 3 and reported in the Guide Star Catalog.
                type: number
              ra_pm:
                title: Proper Motion Right Ascension
                description: |
                  Right ascension component of star's proper motion from the
                  Guide Star Catalog in arcseconds/year.
                type: number
              dec_pm:
                title: Proper Motion Declination
                description: |
                  Declination component of star's proper motion from the
                  Guide Star Catalog in arcseconds/year.
                type: number
              predicted_fgs_mag:
                title: Expected FGS Magnitude
                description: |
                  Expected FGS magnitude for the guide star in the detector.
                type: number
              predicted_fgs_bright_mag:
                title: Brightest Expected FGS Magnitude
                description: |
                  Brightest expected FGS magnitude for the guide star in the detector.
                type: number
              predicted_fgs_faint_mag:
                title: Faintest Expected FGS Magnitude
                description: |
                  Faintest expected FGS magnitude for the guide star in the detector.
                type: number
              predicted_count_rate:
                title: Expected Count Rate
                description: |
                  Expected count rate of the guide star in the detector.
                type: number
              predicted_x:
                title: Expected X Coord
                description: |
                  Expected x coordinate in the science coordinate system.
                type: number
              predicted_y:
                title: Expected Y Coord
                description: |
                  Expected y coordinate in the science coordinate system.
                type: number
              pseudo_star_flag:
                title: Pseudo Star Flag
                description: |
                  Set to Y when a pseudo star is used instead of a real star from the
                  Guide Star Catalog. Set to N for a real star.
                type: string
                enum: ["Y", "N"]
                maxLength: 1
            required:
              [
                "gsc_id",
                "predicted_ra",
                "predicted_dec",
                "gaia_parallax",
                "ra_pm",
                "dec_pm",
                "predicted_fgs_mag",
                "predicted_fgs_bright_mag",
                "predicted_fgs_faint_mag",
                "predicted_count_rate",
                "predicted_x",
                "predicted_y",
                "pseudo_star_flag",
              ]
        required:
          [
            "fgs_modes_used",
            "acq_ma_table_id",
            "acq_gw_cycles_per_sci_read",
            "acq_pedestal_resultant_exp_time",
            "acq_signal_resultant_exp_time",
            "track_ma_table_id",
            "track_gw_cycles_per_sci_read",
            "track_pedestal_resultant_exp_time",
            "track_signal_resultant_exp_time",
            "guide_star_acq_num",
            "guide_window_id",
            "instrument",
            "avg_face_filename",
            "guide_window",
            "guide_star",
          ]
  amp33:
    title: Guide Window Amplifier 33 Reference Pixel Information
    description: |
      Guide Window Amplifier 33 Reference Pixel Information
    type: object
    properties:
      amp33_track_pedestals:
        title: Pedestal Track Amplifier 33 Readouts (DN)
        description: |
          3D array containing the 33rd amplifier readouts (e.g. reference pixels) during
          tracking pedestal resultants.
        tag: tag:stsci.edu:asdf/core/ndarray-1.*
        datatype: uint16
        exact_datatype: true
        ndim: 3
        unit: "DN"
      amp33_track_signals:
        title: Signal Track Amplifier 33 Readouts (DN)
        description: |
          3D array containing the 33rd amplifier readouts (e.g. reference pixels) during
          tracking signal resultants.
        tag: tag:stsci.edu:asdf/core/ndarray-1.*
        datatype: uint16
        exact_datatype: true
        ndim: 3
        unit: "DN"
      # Optional
      amp33_acq_pedestals:
        title: Pedestal Amplifier 33 Readouts (DN)
        description: |
          3D array containing the 33rd amplifier readouts (e.g. reference pixels) during
          acquisition pedestal resultants.
        tag: tag:stsci.edu:asdf/core/ndarray-1.*
        datatype: uint16
        exact_datatype: true
        ndim: 3
        unit: "DN"
      amp33_acq_signals:
        title: Signal Amplifier 33 Readouts (DN)
        description: |
          3D array containing the 33rd amplifier readouts (e.g. reference pixels) during
          acquisition signal resultants.
        tag: tag:stsci.edu:asdf/core/ndarray-1.*
        datatype: uint16
        exact_datatype: true
        ndim: 3
        unit: "DN"
      amp33_edge_acq_pedestals:
        title: Pedestal Edge Amplifier 33 Readouts (DN)
        description: |
          3D array containing the 33rd amplifier readouts (e.g. reference pixels) during
          the edge acquisition pedestal resultants.
        tag: tag:stsci.edu:asdf/core/ndarray-1.*
        datatype: uint16
        exact_datatype: true
        ndim: 3
        unit: "DN"
      amp33_edge_acq_signals:
        title: Signal Edge Amplifier 33 Readouts (DN)
        description: |
          3D array containing the 33rd amplifier readouts (e.g. reference pixels) during
          the edge acquisition signal resultants.
        tag: tag:stsci.edu:asdf/core/ndarray-1.*
        datatype: uint16
        exact_datatype: true
        ndim: 3
        unit: "DN"
  centroid:
    title: Centroid Data
    description: |
      Centroid Data
    type: object
    properties:
      acq_centroids:
        title: Acquisition Centroids
        description: |
          3D array containing the X,Y centroid locations in science coordinates in
          each GW acquisition resultant difference (pedestal resultant - signal
          resultant). Up to 5 sets of centroids can occur for the same resultant
          difference and are filled with NaN if not provided in the downlinked data
          packets. This quantity is set to None for Dark exposures when no centroids
          are taken.
        anyOf:
          - type: "null"
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: float32
            exact_datatype: true
            ndim: 3
      acq_centroid_errs:
        title: Acquisition Centroid Errors
        description: |
          3D array containing the 2nd moment errors of the GW acquisition difference
          centroids (XX, YY, XY). Up to 5 sets of centroid errors can occur for the
          same resultant difference and are filled with NaN if not provided in the
          downlinked data packets. This quantity is set to None for Dark exposures
          when no centroids are taken.
        anyOf:
          - type: "null"
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: float32
            exact_datatype: true
            ndim: 3
      acq_centroid_quality:
        title: Acquisition Centroid Quality
        description: |
          2D array containing strings that describe the quality of the acquisition
          centroids. An empty string indicated the centroid was not provided in the
          downlinked data packets. For further descriptions of the, please consult
          the Roman Documentation page. This quantity is set to None for Dark
          exposures when no centroids are taken.
        tag: tag:stsci.edu:asdf/core/ndarray-1.*
        ndim: 2
        datatype: [ucs4, 40]
        exact_datatype: true
      acq_centroid_times:
        title: Acquisition Centroid Times
        description: |
          1D array of times associated with the centroid of each acquisition resultant
          difference. The centroid times should lie between the pedestal and signal
          resultant times. This quantity is set to None for Dark exposures when no
          centroids are taken.
        type: array
        items:
          anyOf:
            - type: "null"
            - tag: tag:stsci.edu:asdf/time/time-1.*
      track_centroids:
        title: Track Centroids
        description: |
          2D array containing the X,Y centroid locations in science coordinates in each
          GW tracking resultant difference (pedestal resultant - signal resultant). This
          quantity is set to None for Dark exposures when no centroids are taken.
        anyOf:
          - type: "null"
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: float32
            exact_datatype: true
            ndim: 2
      track_centroid_errs:
        title: Track Centroid Errors
        description: |
          2D array containing the 2nd moment errors of the GW tracking difference centroids
          (XX, YY, XY). This quantity is set to None for Dark exposures when no centroids
          are taken.
        anyOf:
          - type: "null"
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: float32
            exact_datatype: true
            ndim: 2
      track_centroid_quality:
        title: Track Centroid Quality
        description: |
          1D array containing strings that describe the quality of the tracking centroids.
          For further descriptions of the, please consult the Roman Documentation page.
          This quantity is set to None for Dark exposures when no centroids are taken.
        anyOf:
          - type: "null"
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            ndim: 1
            datatype: [ucs4, 40]
            exact_datatype: true
      track_centroid_times:
        title: Track Centroid Times
        description: |
          1D array of times associated with the centroid of each tracking resultant difference.
          The centroid times should lie between the pedestal and signal resultant times.
          This quantity is set to None for Dark exposures when no centroids are taken.
        type: array
        items:
          anyOf:
            - type: "null"
            - tag: tag:stsci.edu:asdf/time/time-1.*
      # Optional
      edge_acq_centroids:
        title: Edge Acquisition Centroids
        description: |
          2D array containing the X,Y centroid locations in science coordinates in each GW edge
          acquisition resultant difference (pedestal resultant - signal resultant) (only used
          with WSM). This quantity is set to None for Dark exposures when no centroids are taken.
        anyOf:
          - type: "null"
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: float32
            exact_datatype: true
            ndim: 2
      edge_acq_centroid_errs:
        title: Edge Acquisition Centroid Errors
        description: |
          2D array containing the 2nd moment errors of the GW edge acquisition difference
          centroids (XX, YY, XY) (only used with WSM). This quantity is set to None for Dark
          exposures when no centroids are taken.
        anyOf:
          - type: "null"
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: float32
            exact_datatype: true
            ndim: 2
      edge_acq_centroid_quality:
        title: Edge Acquisition Centroid Quality
        description: |
          1D array containing strings that describe the quality of the edge acquisition
          centroids (only used with WSM). For further descriptions of the, please consult
          the Roman Documentation page. This quantity is set to None for Dark exposures
          when no centroids are taken.
        anyOf:
          - type: "null"
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            ndim: 1
            datatype: [ucs4, 40]
            exact_datatype: true
      edge_acq_centroid_times:
        title: Edge Acquisition Centroid Times
        description: |
          1D array of times associated with the centroid of each edge acquisition resultant
          difference (only used with WSM). The centroid times should lie between the pedestal
          and signal resultant times. This quantity is set to None for Dark exposures when
          no centroids are taken.
        type: array
        items:
          anyOf:
            - type: "null"
            - tag: tag:stsci.edu:asdf/time/time-1.*
  acq_data:
    title: Acquisition Guide Window Data
    description: |
      All data received from the acquisition guide window data packets
    type: object
    properties:
      pedestal_resultants:
        title: Pedestal Resultants (DN)
        description: |
          3D array containing every pedestal resultant's pixel values.
        tag: tag:stsci.edu:asdf/core/ndarray-1.*
        ndim: 3
        datatype: uint16
        unit: "DN"
        exact_datatype: true
      signal_resultants:
        title: Signal Resultants (DN)
        description: |
          3D array containing every signal resultant's pixel values.
        tag: tag:stsci.edu:asdf/core/ndarray-1.*
        ndim: 3
        datatype: uint16
        unit: "DN"
        exact_datatype: true
      lower_left_corners:
        title: Lower Left Corners
        description: |
          2D array containing all the lower left corners of each guide
          window resultant pair in science coordinates (x_start, y_start).
        ndim: 2
        datatype: uint16
        exact_datatype: true
      upper_right_corners:
        title: Upper Right Corners
        description: |
          2D array containing all the upper right corners of each guide
          window resultant pair in science coordinates (x_stop, y_stop).
        ndim: 2
        datatype: uint16
        exact_datatype: true
      pixel_offsets:
        title: Pixel Offsets (DN)
        description: |
          1D array of constants added to all guide window pixel values in
          the resultants or a single integer if all values are equal.
        anyOf:
          - type: integer
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            unit: "DN"
            datatype: uint16
            exact_datatype: true
            ndim: 1
      reset_impacted_pairs:
        title: Reset Impacted Pairs
        description: |
          1D boolean array indicating which pedestal and signal pairs were
          impacted by reset reads. As reset reads execute, the reset and
          read individual pixels in a linear fashion across the full detector.
          Because full frame rows are readout between the pedestal and signal
          resultants, during a reset read some guide window resultants are
          impacted by the reset sweeping across those rows of the detector.
          This flag highlights which guide window resultant pairs are
          impacted by these resets.
        ndim: 1
        datatype: bool8
        exact_datatype: true
      reset_read_flag:
        title: Reset Read Flag
        description: |
          1D array of booleans indicating which guide window resultant pairs
          are read out during a reset. True values correspond to pairs taken
          during reset reads, False values correspond to pairs taken during
          normal frame reads.
        ndim: 1
        datatype: bool8
        exact_datatype: true
      pedestal_times:
        title: Pedestal Times (UTC)
        description: |
          1D array of astropy time objects containing the latched
          MET times in the UTC standard associated with the pedestal resultants.
        type: array
        items:
          tag: tag:stsci.edu:asdf/time/time-1.*
      signal_times:
        title: Signal Times (UTC)
        description: |
          1D array of astropy time objects containing the latched
          MET times in the UTC standard associated with the signal resultants.
        type: array
        items:
          tag: tag:stsci.edu:asdf/time/time-1.*
      sci_data_packet_counts:
        title: Science Data Packet Counts
        description: |
          2D array of the science data packet counts for the matched
          pedestal and signal resultants. The span between the pedestal
          and the signal values indicate which full frame row indices
          were read out during the guide window exposure.
        ndim: 2
        datatype: uint16
        exact_datatype: true
      sce_status_flag:
        title: SCE Status Flag
        description: |
          Either a 2D array containing the SCE status for each pedestal
          and signal resultant or a single integer if all flags are equal.
          1 indicates an internal error occurred during the ACADIA processing.
        anyOf:
          - type: integer
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: uint8
            exact_datatype: true
            ndim: 2
      gw_resultant_err_flag:
        title: Guide Window Resultant Error Flag
        description: |
          Either a 2D array containing the guide window resultant error flag
          for each pedestal and signal resultant or a single integer if all
          flags are equal. 1 indicates an internal error in the SCU occurred
          while processing the GW resultant. See FPGA error registers for
          more information.
        anyOf:
          - type: integer
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: uint8
            exact_datatype: true
            ndim: 2
      min_bind_flag:
        title: Minimum Binding Flag
        description: |
          Either a 2D array containing the binding minimum flag for each pedestal
          and signal resultant or a single integer if all flags are equal.
          1 indicates that any negative pixel values within the resultant were bound to 0.
        anyOf:
          - type: integer
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: uint8
            exact_datatype: true
            ndim: 2
      max_bind_flag:
        title: Maximum Binding Flag
        description: |
          Either a 2D array containing the binding maximum flag for each pedestal
          and signal resultant or a single integer if all flags are equal.
          1 indicates that any positive pixel values within the resultant were bound to 65535.
        anyOf:
          - type: integer
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: uint8
            exact_datatype: true
            ndim: 2
  track_data:
    title: Tracking Guide Window Data
    description: |
      All data received from the tracking guide window data packets
    type: object
    properties:
      pedestal_resultants:
        title: Pedestal Resultants (DN)
        description: |
          3D array containing every pedestal resultant's pixel values.
        tag: tag:stsci.edu:asdf/core/ndarray-1.*
        ndim: 3
        datatype: uint16
        unit: "DN"
        exact_datatype: true
      signal_resultants:
        title: Signal Resultants (DN)
        description: |
          3D array containing every signal resultant's pixel values.
        tag: tag:stsci.edu:asdf/core/ndarray-1.*
        ndim: 3
        datatype: uint16
        unit: "DN"
        exact_datatype: true
      lower_left_corners:
        title: Lower Left Corners
        description: |
          2D array containing all the lower left corners of each guide
          window resultant pair in science coordinates (x_start, y_start).
        ndim: 2
        datatype: uint16
        exact_datatype: true
      upper_right_corners:
        title: Upper Right Corners
        description: |
          2D array containing all the upper right corners of each guide
          window resultant pair in science coordinates (x_stop, y_stop).
        ndim: 2
        datatype: uint16
        exact_datatype: true
      pixel_offsets:
        title: Pixel Offsets (DN)
        description: |
          1D array of constants added to all guide window pixel values in
          the resultants or a single integer if all values are equal.
        anyOf:
          - type: integer
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            unit: "DN"
            datatype: uint16
            exact_datatype: true
            ndim: 1
      reset_impacted_pairs:
        title: Reset Impacted Pairs
        description: |
          1D boolean array indicating which pedestal and signal pairs were
          impacted by reset reads. As reset reads execute, the reset and
          read individual pixels in a linear fashion across the full detector.
          Because full frame rows are readout between the pedestal and signal
          resultants, during a reset read some guide window resultants are
          impacted by the reset sweeping across those rows of the detector.
          This flag highlights which guide window resultant pairs are
          impacted by these resets.
        ndim: 1
        datatype: bool8
        exact_datatype: true
      reset_read_flag:
        title: Reset Read Flag
        description: |
          1D array of booleans indicating which guide window resultant pairs
          are read out during a reset. True values correspond to pairs taken
          during reset reads, False values correspond to pairs taken during
          normal frame reads.
        ndim: 1
        datatype: bool8
        exact_datatype: true
      pedestal_times:
        title: Pedestal Times (UTC)
        description: |
          1D array of astropy time objects containing the latched
          MET times in the UTC standard associated with the pedestal resultants.
        type: array
        items:
          tag: tag:stsci.edu:asdf/time/time-1.*
      signal_times:
        title: Signal Times (UTC)
        description: |
          1D array of astropy time objects containing the latched
          MET times in the UTC standard associated with the signal resultants.
        type: array
        items:
          tag: tag:stsci.edu:asdf/time/time-1.*
      sci_data_packet_counts:
        title: Science Data Packet Counts
        description: |
          2D array of the science data packet counts for the matched
          pedestal and signal resultants. The span between the pedestal
          and the signal values indicate which full frame row indices
          were read out during the guide window exposure.
        ndim: 2
        datatype: uint16
        exact_datatype: true
      sce_status_flag:
        title: SCE Status Flag
        description: |
          Either a 2D array containing the SCE status for each pedestal
          and signal resultant or a single integer if all flags are equal.
          1 indicates an internal error occurred during the ACADIA processing.
        anyOf:
          - type: integer
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: uint8
            exact_datatype: true
            ndim: 2
      gw_resultant_err_flag:
        title: Guide Window Resultant Error Flag
        description: |
          Either a 2D array containing the guide window resultant error flag
          for each pedestal and signal resultant or a single integer if all
          flags are equal. 1 indicates an internal error in the SCU occurred
          while processing the GW resultant. See FPGA error registers for
          more information.
        anyOf:
          - type: integer
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: uint8
            exact_datatype: true
            ndim: 2
      min_bind_flag:
        title: Minimum Binding Flag
        description: |
          Either a 2D array containing the binding minimum flag for each pedestal
          and signal resultant or a single integer if all flags are equal.
          1 indicates that any negative pixel values within the resultant were bound to 0.
        anyOf:
          - type: integer
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: uint8
            exact_datatype: true
            ndim: 2
      max_bind_flag:
        title: Maximum Binding Flag
        description: |
          Either a 2D array containing the binding maximum flag for each pedestal
          and signal resultant or a single integer if all flags are equal.
          1 indicates that any positive pixel values within the resultant were bound to 65535.
        anyOf:
          - type: integer
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: uint8
            exact_datatype: true
            ndim: 2
      # Optional
      exposure_mapping:
        title: Exposure Mapping
        description: |
          1D array of signed integers with the same length as the tracking signal resultants.
          Positive integers correspond to the exposure number (single MA Table read).
          Negative integers correspond to the tracking reads between exposures.
        ndim: 1
        datatype: int16
        exact_datatype: true
  # WSM Mode Only
  edge_acq_data:
    title: Spectrum Edge Acquisition Guide Window Data
    description: |
      All data received from the spectrum edge acquisition guide window data packets during
      WSM exposures. This secondary acquisition only occurs during spectroscopic observations.
    type: object
    properties:
      pedestal_resultants:
        title: Pedestal Resultants (DN)
        description: |
          3D array containing every pedestal resultant's pixel values.
        tag: tag:stsci.edu:asdf/core/ndarray-1.*
        ndim: 3
        datatype: uint16
        unit: "DN"
        exact_datatype: true
      signal_resultants:
        title: Signal Resultants (DN)
        description: |
          3D array containing every signal resultant's pixel values.
        tag: tag:stsci.edu:asdf/core/ndarray-1.*
        ndim: 3
        datatype: uint16
        unit: "DN"
        exact_datatype: true
      lower_left_corners:
        title: Lower Left Corners
        description: |
          2D array containing all the lower left corners of each guide
          window resultant pair in science coordinates (x_start, y_start).
        ndim: 2
        datatype: uint16
        exact_datatype: true
      upper_right_corners:
        title: Upper Right Corners
        description: |
          2D array containing all the upper right corners of each guide
          window resultant pair in science coordinates (x_stop, y_stop).
        ndim: 2
        datatype: uint16
        exact_datatype: true
      pixel_offsets:
        title: Pixel Offsets (DN)
        description: |
          1D array of constants added to all guide window pixel values in
          the resultants or a single integer if all values are equal.
        anyOf:
          - type: integer
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            unit: "DN"
            datatype: uint16
            exact_datatype: true
            ndim: 1
      reset_impacted_pairs:
        title: Reset Impacted Pairs
        description: |
          1D boolean array indicating which pedestal and signal pairs were
          impacted by reset reads. As reset reads execute, the reset and
          read individual pixels in a linear fashion across the full detector.
          Because full frame rows are readout between the pedestal and signal
          resultants, during a reset read some guide window resultants are
          impacted by the reset sweeping across those rows of the detector.
          This flag highlights which guide window resultant pairs are
          impacted by these resets.
        ndim: 1
        datatype: bool8
        exact_datatype: true
      reset_read_flag:
        title: Reset Read Flag
        description: |
          1D array of booleans indicating which guide window resultant pairs
          are read out during a reset. True values correspond to pairs taken
          during reset reads, False values correspond to pairs taken during
          normal frame reads.
        ndim: 1
        datatype: bool8
        exact_datatype: true
      pedestal_times:
        title: Pedestal Times (UTC)
        description: |
          1D array of astropy time objects containing the latched
          MET times in the UTC standard associated with the pedestal resultants.
        type: array
        items:
          tag: tag:stsci.edu:asdf/time/time-1.*
      signal_times:
        title: Signal Times (UTC)
        description: |
          1D array of astropy time objects containing the latched
          MET times in the UTC standard associated with the signal resultants.
        type: array
        items:
          tag: tag:stsci.edu:asdf/time/time-1.*
      sci_data_packet_counts:
        title: Science Data Packet Counts
        description: |
          2D array of the science data packet counts for the matched
          pedestal and signal resultants. The span between the pedestal
          and the signal values indicate which full frame row indices
          were read out during the guide window exposure.
        ndim: 2
        datatype: uint16
        exact_datatype: true
      sce_status_flag:
        title: SCE Status Flag
        description: |
          Either a 2D array containing the SCE status for each pedestal
          and signal resultant or a single integer if all flags are equal.
          1 indicates an internal error occurred during the ACADIA processing.
        anyOf:
          - type: integer
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: uint8
            exact_datatype: true
            ndim: 2
      gw_resultant_err_flag:
        title: Guide Window Resultant Error Flag
        description: |
          Either a 2D array containing the guide window resultant error flag
          for each pedestal and signal resultant or a single integer if all
          flags are equal. 1 indicates an internal error in the SCU occurred
          while processing the GW resultant. See FPGA error registers for
          more information.
        anyOf:
          - type: integer
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: uint8
            exact_datatype: true
            ndim: 2
      min_bind_flag:
        title: Minimum Binding Flag
        description: |
          Either a 2D array containing the binding minimum flag for each pedestal
          and signal resultant or a single integer if all flags are equal.
          1 indicates that any negative pixel values within the resultant were bound to 0.
        anyOf:
          - type: integer
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: uint8
            exact_datatype: true
            ndim: 2
      max_bind_flag:
        title: Maximum Binding Flag
        description: |
          Either a 2D array containing the binding maximum flag for each pedestal
          and signal resultant or a single integer if all flags are equal.
          1 indicates that any positive pixel values within the resultant were bound to 65535.
        anyOf:
          - type: integer
          - tag: tag:stsci.edu:asdf/core/ndarray-1.*
            datatype: uint8
            exact_datatype: true
            ndim: 2
propertyOrder: [meta, acq_data, track_data, edge_acq_data, centroid, amp33]
flowStyle: block
required: [meta, acq_data, track_data, centroid, amp33]