simpunch.level1#

Generates synthetic level 1 data.

Attributes#

Functions#

generate_spacecraft_wcs(→ astropy.wcs.WCS)

Generate the spacecraft world coordinate system.

deproject_polar(→ tuple[ndcube.NDCube, astropy.wcs.WCS])

Deproject a polarized image.

deproject_clear(→ tuple[ndcube.NDCube, astropy.wcs.WCS])

Deproject a clear image.

mark_quality(→ ndcube.NDCube)

Mark the quality of image patches.

remix_polarization(→ ndcube.NDCube)

Remix polarization from (M, Z, P) to (P1, P2, P3) using solpolpy.

add_distortion(→ ndcube.NDCube)

Add a distortion model to the WCS.

generate_starfield(wcs, img_shape, fwhm, wcs_mode, ...)

Generate a realistic starfield.

add_starfield_polarized() → ndcube.NDCollection)

Add synthetic polarized starfield.

add_starfield_clear(→ ndcube.NDCube)

Add synthetic starfield.

generate_dummy_polarization(→ ndcube.NDCube)

Create a synthetic polarization map.

generate_l1_pmzp(→ list[str])

Generate level 1 polarized synthetic data.

generate_l1_cr(→ str)

Generate level 1 clear synthetic data.

Module Contents#

simpunch.level1.CURRENT_DIR#
simpunch.level1.generate_spacecraft_wcs(spacecraft_id: str, rotation_stage: int) astropy.wcs.WCS[source]#

Generate the spacecraft world coordinate system.

simpunch.level1.deproject_polar(input_data: ndcube.NDCube, output_wcs: astropy.wcs.WCS, adaptive_reprojection: bool = False) tuple[ndcube.NDCube, astropy.wcs.WCS][source]#

Deproject a polarized image.

simpunch.level1.deproject_clear(input_data: ndcube.NDCube, output_wcs: astropy.wcs.WCS, adaptive_reprojection: bool = False) tuple[ndcube.NDCube, astropy.wcs.WCS][source]#

Deproject a clear image.

simpunch.level1.mark_quality(input_data: ndcube.NDCube) ndcube.NDCube[source]#

Mark the quality of image patches.

simpunch.level1.remix_polarization(input_data: ndcube.NDCube) ndcube.NDCube[source]#

Remix polarization from (M, Z, P) to (P1, P2, P3) using solpolpy.

simpunch.level1.add_distortion(input_data: ndcube.NDCube) ndcube.NDCube[source]#

Add a distortion model to the WCS.

simpunch.level1.generate_starfield(wcs: astropy.wcs.WCS, img_shape: int, int, fwhm: float, wcs_mode: str = 'all', mag_set: float = 0, flux_set: float = 500000, noise_mean: float | None = 25.0, noise_std: float | None = 5.0, dimmest_magnitude: float = 8)[source]#

Generate a realistic starfield.

simpunch.level1.add_starfield_polarized(input_collection: ndcube.NDCollection, polfactor: tuple = (0.2, 0.3, 0.5)) ndcube.NDCollection[source]#

Add synthetic polarized starfield.

simpunch.level1.add_starfield_clear(input_data: ndcube.NDCube) ndcube.NDCube[source]#

Add synthetic starfield.

simpunch.level1.generate_dummy_polarization(map_scale: float = 0.225, pol_factor: float = 0.5) ndcube.NDCube[source]#

Create a synthetic polarization map.

simpunch.level1.generate_l1_pmzp(input_file: str, path_output: str, rotation_stage: int, spacecraft_id: str) list[str][source]#

Generate level 1 polarized synthetic data.

simpunch.level1.generate_l1_cr(input_file: str, path_output: str, rotation_stage: int, spacecraft_id: str) str[source]#

Generate level 1 clear synthetic data.