simpunch.level0#

Generate synthetic level 0 data.

Functions#

perform_photometric_uncalibration(→ ndcube.NDCube)

Undo quartic fit calibration.

add_spikes(input_data, 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.

generate_l0_pmzp(→ None)

Generate level 0 polarized synthetic data.

generate_l0_cr(→ None)

Generate level 0 clear synthetic data.

generate_l0_all(→ None)

Generate all level 0 synthetic data.

Module Contents#

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

Undo quartic fit calibration.

simpunch.level0.add_spikes(input_data: ndcube.NDCube)#

Add spikes to images.

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

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#

Apply the streak matrix to the image.

simpunch.level0.add_deficient_pixels(input_data: ndcube.NDCube) ndcube.NDCube#

Add deficient pixels to the image.

simpunch.level0.add_stray_light(input_data: ndcube.NDCube) ndcube.NDCube#

Add stray light to the image.

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

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: float, float = (0.6, 0.8)) ndcube.NDCube#

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#

Offset the pointing in an image to simulate spacecraft uncertainty.

simpunch.level0.generate_l0_pmzp(input_file: ndcube.NDCube, path_output: str, psf_model_path: str, wfi_quartic_coeffs_path: str, nfi_quartic_coeffs_path: str, transient_probability: float = 0.03, shift_pointing: bool = False) None#

Generate level 0 polarized synthetic data.

simpunch.level0.generate_l0_cr(input_file: ndcube.NDCube, path_output: str, psf_model_path: str, wfi_quartic_coeffs_path: str, nfi_quartic_coeffs_path: str, transient_probability: float = 0.03, shift_pointing: bool = False) None#

Generate level 0 clear synthetic data.

simpunch.level0.generate_l0_all(datadir: str, outputdir: str, psf_model_path: str, wfi_quartic_coeffs_path: str, nfi_quartic_coeffs_path: str, transient_probability: float = 0.03, shift_pointing: bool = False) None#

Generate all level 0 synthetic data.