punchbowl.level2.flow#

Attributes#

Functions#

level2_core_flow(→ list[ndcube.NDCube])

Level 2 core flow.

Module Contents#

punchbowl.level2.flow.POLARIZED_FILE_ORDER = ['PM1', 'PZ1', 'PP1', 'PM2', 'PZ2', 'PP2', 'PM3', 'PZ3', 'PP3', 'PM4', 'PZ4', 'PP4']#
punchbowl.level2.flow.SPACECRAFT_OBSCODE#
punchbowl.level2.flow.level2_core_flow(data_list: list[str] | list[ndcube.NDCube], voter_filenames: list[list[str]], polarized: bool | None = None, trefoil_wcs: astropy.wcs.WCS | None = None, trefoil_shape: tuple[int, int] | None = None, rolloff_width: float | list[float] = 0.25, rolloff_strength: float | list[float] = 1, trim_edges_px: int | list[int] = 0, alphas_file: str | None = None, image_masks: list[str | None] | None = None, output_filename: str | None = None) list[ndcube.NDCube][source]#

Level 2 core flow.

Parameters:
  • data_list (list[str] | list[NDCube]) – The files or data cubes to be merged into a mosaic

  • voter_filenames (list[list[str]]) – The voter files for detecting bright structures

  • polarized (bool) – Whether to generate a polarized or clear mosaic. Only required if data_list is not provided (and so an empty cube is being generated). Otherwise, this is auto-detected.

  • trefoil_wcs (WCS | None) – The frame to build the mosaic in. By default, the default trefoil mosaic is used.

  • trefoil_shape (tuple[int, int] | None) – The size of the frame to build the mosaic in. By default, the default trefoil size is used.

  • rolloff_width (float | list[float]) – Before reprojection, image uncertainties are enhanced at the edges, to provide a smooth rolloff in merging. This controls the width of that rolloff. The rolloff width will be this number, times the shortest distance from image-center to image-mask-edge. A list can be provided to give one value for each spacecraft.

  • rolloff_strength (float | list[float]) – Before reprojection, image uncertainties are enhanced at the edges, to provide a smooth rolloff in merging. This controls the strength of that rolloff. Merging weights at the mask edge will be reduced by this fractional amount. A strength of zero means no rolloff. A list can be provided to give one value for each spacecraft.

  • trim_edges_px (int | list[int]) –

    Before reprojection, image edges are trimmed by this amount, and the masked region is expanded by this amount. A

    list can be provided to give one value for each spacecraft.

  • alphas_file (str) – File path containing alpha scalings for relative instrument scaling.

  • image_masks (list[str | None] | None) – File paths containing masks to be applied before reprojection, one per input image.

  • output_filename (str | None) – If provided, the resulting mosaic is written to this path.

Returns:

output_data – The resulting data cube. For compatibility, it will be a list of a single cube.

Return type:

list[NDCube]