romanimpreprocess.L1_to_L2.oututils

Utilities needed for writing L2 data.

Functions

add_in_ref_data

Adds in reference pixel & output data to the given Roman structure.

update_flags

Updates calibration flags. This routine should be kept current with what each type does.

add_in_provenance

Adds in provenance information to a roman L2 structure.

Functions

add_in_ref_data(rstruct, infile, rdq, pdq)

Adds in reference pixel & output data to the given Roman structure.

update_flags(rstruct, ftype)

Updates calibration flags. This routine should be kept current with what each ftype does.

add_in_provenance(rstruct, ftype)

Adds in provenance information to a roman L2 structure.

Module Contents

add_in_ref_data(rstruct, infile, rdq, pdq)[source]

Adds in reference pixel & output data to the given Roman structure.

Also populates the quality flags.

Parameters:
  • rstruct (dict) – Branch of L2 ASDF file.

  • infile (str) – Name of the L1 ASDF file.

  • rdq (np.array) – 3D quality uint32 flags.

  • pdq – 2D quality uint32 flags.

Return type:

None

update_flags(rstruct, ftype)[source]

Updates calibration flags. This routine should be kept current with what each ftype does.

Most likely, you will call this from gen_cal_image and use that as the ftype.

Parameters:
  • rstruct (dict) – Branch of L2 ASDF file.

  • ftype (str) – Which function is updating the flags.

Return type:

None

add_in_provenance(rstruct, ftype)[source]

Adds in provenance information to a roman L2 structure.

Parameters:
  • rstruct (dict) – Branch of L2 ASDF file.

  • ftype (str) – Which function is updating the flags.

Return type:

None