punchbowl.level3.stellar#

Classes#

PUNCHImageProcessor

Special loader for PUNCH data.

Functions#

polarize_solar_to_celestial(...)

Convert polarization from mzpsolar to Celestial frame.

polarize_celestial_to_solar(...)

Convert polarization from Celestial frame to mzpsolar.

determine_wcs(→ astropy.wcs.WCS)

Calculate a tightly-cropped model WCS.

generate_starfield_background(...)

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

subtract_starfield_background_task(...)

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: punchbowl.data.punchcube.PUNCHCube, dtype: None | type = None) punchbowl.data.punchcube.PUNCHCube[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: punchbowl.data.punchcube.PUNCHCube, dtype: None | type = None) punchbowl.data.punchcube.PUNCHCube[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(apply_mask: bool = True, key: str = ' ')[source]#

Bases: remove_starfield.ImageProcessor

Special loader for PUNCH data.

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

Load an image.

punchbowl.level3.stellar.determine_wcs(filenames: list, map_scale: float) astropy.wcs.WCS[source]#

Calculate a tightly-cropped model WCS.

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) punchbowl.data.punchcube.PUNCHCube | 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: punchbowl.data.punchcube.PUNCHCube, before_starfield_path: str | None, after_starfield_path: str | None, is_polarized: bool = False) punchbowl.data.punchcube.PUNCHCube[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 (PUNCHCube) – A PUNCHCube data frame to be background subtracted

  • before_starfield_path (str) – path to a PUNCHCube background starfield map centered before the observation

  • after_starfield_path (str) – path to a PUNCHCube background starfield map centered after the observation

  • is_polarized (bool) – whether the data is polarized

Returns:

A background starfield subtracted data frame

Return type:

PUNCHCube

punchbowl.level3.stellar.create_empty_starfield_background(data_object: punchbowl.data.punchcube.PUNCHCube) numpy.ndarray[source]#

Create an empty starfield background map.