simpunch.level0#

Generate synthetic level 0 data.

Functions#

perform_photometric_uncalibration(→ ndcube.NDCube)

Undo quartic fit calibration.

add_spikes(→ tuple[ndcube.NDCube, numpy.ndarray])

Add spikes to images.

create_streak_matrix(→ numpy.ndarray)

Construct the matrix that streaks an image.

apply_streaks(→ ndcube.NDCube)

Apply the streak matrix to the image.

add_deficient_pixels(→ ndcube.NDCube)

Add deficient pixels to the image.

add_stray_light(→ ndcube.NDCube)

Add stray light to the image.

uncorrect_psf(→ ndcube.NDCube)

Apply an inverse PSF to an image.

add_transients() → ndcube.NDCube)

Add a block of brighter transient data to simulate aurora.

starfield_misalignment(→ ndcube.NDCube)

Offset the pointing in an image to simulate spacecraft uncertainty.

apply_mask(→ ndcube.NDCube)

Apply the appropriate instrument mask to a NDCube.

generate_l0_pmzp(→ str)

Generate level 0 polarized synthetic data.

generate_l0_cr(→ str)

Generate level 0 clear synthetic data.

Module Contents#

simpunch.level0.perform_photometric_uncalibration(input_data: ndcube.NDCube, coefficient_array: numpy.ndarray) ndcube.NDCube[source]#

Undo quartic fit calibration.

simpunch.level0.add_spikes(input_data: ndcube.NDCube) tuple[ndcube.NDCube, numpy.ndarray][source]#

Add spikes to images.

simpunch.level0.create_streak_matrix(n: int, exposure_time: float, readout_line_time: float, reset_line_time: float) numpy.ndarray[source]#

Construct the matrix that streaks an image.

simpunch.level0.apply_streaks(input_data: ndcube.NDCube, exposure_time: float = 49 * 1000, readout_line_time: float = 163 / 2148, reset_line_time: float = 163 / 2148) ndcube.NDCube[source]#

Apply the streak matrix to the image.

simpunch.level0.add_deficient_pixels(input_data: ndcube.NDCube) ndcube.NDCube[source]#

Add deficient pixels to the image.

simpunch.level0.add_stray_light(input_data: ndcube.NDCube, inst: str = 'WFI', polar: str = 'mzp') ndcube.NDCube[source]#

Add stray light to the image.

simpunch.level0.uncorrect_psf(input_data: ndcube.NDCube, psf_model: regularizepsf.ArrayPSFTransform) ndcube.NDCube[source]#

Apply an inverse PSF to an image.

simpunch.level0.add_transients(input_data: ndcube.NDCube, transient_area: int = 600**2, transient_probability: float = 0.03, transient_brightness_range: tuple[float, float] = (0.6, 0.8)) ndcube.NDCube[source]#

Add a block of brighter transient data to simulate aurora.

simpunch.level0.starfield_misalignment(input_data: ndcube.NDCube, cr_offset_scale: float = 0.1, pc_offset_scale: float = 0.1) ndcube.NDCube[source]#

Offset the pointing in an image to simulate spacecraft uncertainty.

simpunch.level0.apply_mask(input_data: ndcube.NDCube) ndcube.NDCube[source]#

Apply the appropriate instrument mask to a NDCube.

simpunch.level0.generate_l0_pmzp(input_file: str, path_output: str, psf_model_path: str | collections.abc.Callable, wfi_quartic_coeffs_path: str | collections.abc.Callable, nfi_quartic_coeffs_path: str | collections.abc.Callable, transient_probability: float = 0.03, shift_pointing: bool = False) str[source]#

Generate level 0 polarized synthetic data.

simpunch.level0.generate_l0_cr(input_file: str, path_output: str, psf_model_path: str | collections.abc.Callable, wfi_quartic_coeffs_path: str | collections.abc.Callable, nfi_quartic_coeffs_path: str | collections.abc.Callable, transient_probability: float = 0.03, shift_pointing: bool = False) str[source]#

Generate level 0 clear synthetic data.