def test__data_mapped_to_2d_and_then_1d(): arr_1d = ac.Array1D.manual_native( array=[1.0, 2.0, 3.0, 4.0], pixel_scales=1.0, header=ac.Header(header_sci_obj=None, header_hdu_obj=None, readout_offsets=(3, )), ).native arr_2d = ac.Array2D.manual( array=[[1.0], [2.0], [3.0], [4.0]], pixel_scales=1.0, header=ac.Header(header_sci_obj=None, header_hdu_obj=None, readout_offsets=(3, )), ).native roe = ac.ROE( dwell_times=[1.0], empty_traps_between_columns=True, empty_traps_for_first_transfers=False, force_release_away_from_readout=True, use_integer_express_matrix=False, ) ccd_phase = ac.CCDPhase(full_well_depth=1e3, well_notch_depth=0.0, well_fill_power=1.0) ccd = ac.CCD(phases=[ccd_phase], fraction_of_traps_per_phase=[1.0]) traps = [ac.TrapInstantCapture(10.0, -1.0 / np.log(0.5))] image_via_arctic = cti.add_cti( image=arr_2d, parallel_traps=traps, parallel_ccd=ccd, parallel_roe=roe, parallel_express=3, parallel_offset=3, ) clocker_1d = ac.Clocker1D(express=3, roe=roe) image_via_clocker = clocker_1d.add_cti(data=arr_1d, trap_list=traps, ccd=ccd_phase) assert image_via_arctic.flatten() == pytest.approx(image_via_clocker, 1.0e-4)
""" region_1d_list = [(10, 20)] """ The line dataset consists of multiple charge lines at different normalizations. Below, we specify the normalization of every line, where the size of this list determines how many lines are simulated in total. """ normalization_list = [100, 5000, 25000, 84700] """ __Clocker__ The `Clocker1D` object models the read-out process of every line as if it were clocked out on a real CCD. This includes the addition of CTI. """ clocker = ac.Clocker1D(express=2) """ __CTI Model__ The CTI model used by arCTIc to add CTI to the simulated lines, which contains: - 3 `TrapInstantCapture1 species, which captures electrons during clocking instantly and releases them according to an exponential probability distribution defined by a single release times. - A simple CCD volume beta parametrization. """ trap_0 = ac.TrapInstantCapture(density=0.0442, release_timescale=0.8) trap_1 = ac.TrapInstantCapture(density=0.1326, release_timescale=4.0) trap_2 = ac.TrapInstantCapture(density=3.9782, release_timescale=20.0) trap_list = [trap_0, trap_1, trap_2]