punchbowl.level2.preprocess#

Functions#

trim_edges(→ None)

Trim the edges of the image, expanding the mask the same amount. Sets masked pixels to nan.

_load_mask_wrapper(→ numpy.ndarray)

apply_masks(→ None)

Apply image masks. Sets masked pixels to nan.

apply_alpha(→ None)

Apply alpha scalings.

preprocess_trefoil_inputs(→ None)

Preprocess trefoil inputs.

Module Contents#

punchbowl.level2.preprocess.trim_edges(data_list: list[ndcube.NDCube], trim_edge_px: int | list[int] = 0) None[source]#

Trim the edges of the image, expanding the mask the same amount. Sets masked pixels to nan.

punchbowl.level2.preprocess._load_mask_wrapper(mask_path: str) numpy.ndarray[source]#
punchbowl.level2.preprocess.apply_masks(data_list: list[ndcube.NDCube], mask_list: list[str | None]) None[source]#

Apply image masks. Sets masked pixels to nan.

punchbowl.level2.preprocess.apply_alpha(data_list: list[ndcube.NDCube], alphas_file: str | None = None) None[source]#

Apply alpha scalings.

punchbowl.level2.preprocess.preprocess_trefoil_inputs(data_list: list[ndcube.NDCube], mask_list: list[str | None], trim_edge_px: int = 0, alphas_file: str | None = None) None[source]#

Preprocess trefoil inputs.