punchbowl.level3.stellar#

Classes#

PUNCHImageProcessor

Special loader for PUNCH data.

Functions#

polarize_solar_to_celestial(→ ndcube.NDCube)

Convert polarization from mzpsolar to Celestial frame.

polarize_celestial_to_solar(→ ndcube.NDCube)

Convert polarization from Celestial frame to mzpsolar.

generate_starfield_background(→ ndcube.NDCube | None)

Create a background starfield map from a series of PUNCH images over a long period of time.

subtract_starfield_background_task(→ ndcube.NDCube)

Subtracts a background starfield from an input data frame.

create_empty_starfield_background(→ numpy.ndarray)

Create an empty starfield background map.

Module Contents#

punchbowl.level3.stellar.polarize_solar_to_celestial(input_data: ndcube.NDCube) ndcube.NDCube[source]#

Convert polarization from mzpsolar to Celestial frame.

All images need their polarization converted to Celestial frame to generate the background starfield model.

punchbowl.level3.stellar.polarize_celestial_to_solar(input_data: ndcube.NDCube) ndcube.NDCube[source]#

Convert polarization from Celestial frame to mzpsolar.

All images need their polarization converted back to Solar frame after removing the stellar polarization.

class punchbowl.level3.stellar.PUNCHImageProcessor(layer: int | None = None, apply_mask: bool = True, key: str = ' ')[source]#

Bases: remove_starfield.ImageProcessor

Special loader for PUNCH data.

layer: int | None = None#
apply_mask = True#
key = ' '#
load_image(filename: str) remove_starfield.ImageHolder[source]#

Load an image.

punchbowl.level3.stellar.generate_starfield_background(filenames: list[str], map_scale: float = 0.01, target_mem_usage: float = 1000, n_procs: int | None = None, reference_time: datetime.datetime | None = None, is_polarized: bool = False, out_file: str | None = None) ndcube.NDCube | None[source]#

Create a background starfield map from a series of PUNCH images over a long period of time.

punchbowl.level3.stellar.subtract_starfield_background_task(data_object: ndcube.NDCube, starfield_background_path: str | None, is_polarized: bool = False) ndcube.NDCube[source]#

Subtracts a background starfield from an input data frame.

checks the dimensions of input data frame and background starfield match and subtracts the background starfield from the data frame of interest.

Parameters:
  • data_object (NDCube) – A NDCube data frame to be background subtracted

  • starfield_background_path (str) – path to a NDCube background starfield map

  • is_polarized (bool) – whether the data is polarized

Returns:

A background starfield subtracted data frame

Return type:

NDCube

punchbowl.level3.stellar.create_empty_starfield_background(data_object: ndcube.NDCube) numpy.ndarray[source]#

Create an empty starfield background map.