scifysim.spectrograph module
- class scifysim.spectrograph.basic_integrator(keepall=True)[source]
Bases:
object
- __dict__ = mappingproxy({'__module__': 'scifysim.spectrograph', '__init__': <function basic_integrator.__init__>, 'accumulate': <function basic_integrator.accumulate>, 'compute_stats': <function basic_integrator.compute_stats>, 'compute_noised': <function basic_integrator.compute_noised>, 'get_total': <function basic_integrator.get_total>, 'reset': <function basic_integrator.reset>, '__dict__': <attribute '__dict__' of 'basic_integrator' objects>, '__weakref__': <attribute '__weakref__' of 'basic_integrator' objects>, '__doc__': None, '__annotations__': {}})
- __module__ = 'scifysim.spectrograph'
- __weakref__
list of weak references to the object (if defined)
- class scifysim.spectrograph.integrator(config=None, keepall=True, n_sources=4, infinite_well=False)[source]
Bases:
object
- __dict__ = mappingproxy({'__module__': 'scifysim.spectrograph', '__init__': <function integrator.__init__>, 'update_enclosure': <function integrator.update_enclosure>, 'accumulate': <function integrator.accumulate>, 'compute_stats': <function integrator.compute_stats>, 'get_total': <function integrator.get_total>, 'get_static': <function integrator.get_static>, 'get_starlight': <function integrator.get_starlight>, 'get_planetlight': <function integrator.get_planetlight>, 'reset': <function integrator.reset>, 'prepare_t_exp_base': <function integrator.prepare_t_exp_base>, 'consolidate_metrologic': <function integrator.consolidate_metrologic>, '__dict__': <attribute '__dict__' of 'integrator' objects>, '__weakref__': <attribute '__weakref__' of 'integrator' objects>, '__doc__': None, '__annotations__': {}})
- __init__(config=None, keepall=True, n_sources=4, infinite_well=False)[source]
Contains the pixel model of the detector. Currently it does not implement a system gain (1ADU = 1photoelectron)
Parameters:
keepall : [boolean] Whether to keep each of the steps accumulated
eta : The quantum efficiency
ron : [photoelectrons] The read-out noise
ENF : The Excess Noise Factor 1 if not applicable
mgain : The amplification gain (for EMCCDs or APD/eAPD sensors)
well : [photelectrons] The well depth
n_sources : The number of different sources propagated through the instrument
Content:
planetlight
: The planet light with shape (n_wavelength, n_outputs)starlight
: The starlight light with shape (n_wavelength, n_outputs)static
: The list for all sources (seeself.source_labels
) of the background diffuse light propagated through all ouptuts. Shape is (n_wavelength, n_outputs) each. This is only gets updated once per pointing (at the start of the first make_exposure, upon detection of the absence of axx_r
attribute on the first diffuse source).cold_bg
: The flux from cold enclosure [e-/s/pixel]
For each subexposure (if
full_record
is True in callingdirector.make_exposure
ordirector.make_metrologic_exposure
.ft_phase
: Phase error [rad] from fringe-tracking of the first wavelength bin.inj_phase
: Phase error [rad] at injection of the first wavelength bin.inj_amp
: Amplitude of the injection phasor from injectionvals
: Only ifself.keepall
is true
- __module__ = 'scifysim.spectrograph'
- __weakref__
list of weak references to the object (if defined)
- accumulate(value)[source]
Accumulates some signal.
Parameters:
value : The signals to accumulate [photons]
- consolidate_metrologic()[source]
Compiles the results of metrologic exposure.
Paramters compiled:
self.nsamples
: The number of integration stepsself.summed_signal
: The total integration of all sources throughout the time stepsself.total_summed_signal
: The total integration over both sources and time stepsself.sums
: The list of signals from each of the sources summed over the time stepsself.source_labels
: The labels of the sources corresponding to sums.
- get_static()[source]
Returns * total_static: the total value of integrated light from static sources. [ph/dit/ch] * dark_current: the dark current [e-/dit/pix] * enclosure_thermal_background : [e-/dit/pix]
Not affected by noises
- get_total(spectrograph=None, t_exp=None, n_pixsplit=None)[source]
Made a little bit complicated by the ability to simulate CRED1 camera. It is at this stage that the quantum efficiency
self.eta
is taken into account.Parameters:
spectrograph : A spectrograph object to map the spectra on a 2D detector
t_exp : [s] Integration time to take into account dark current This is only used if self.exposure is close to 0. (if the )
n_pixsplit : The number of pixels over which to spread the signal of each spectral bin.
- prepare_t_exp_base()[source]
Computes some basic laws regarding exposure times for the current configuration:
Parameters:
self.expr_snr_t : expression of SNR as function of time which also gets printed
self.expr_t_for_snr : time to get a given SNR
self.expr_well_fraction : Fraction of well filled by the number of Ph considered
self.expr_t_max : Maximum exposure time to fill the well
self.t_exp_base : lambdified version of expr_t_for_snr
self.snr_t : lambdified version of expr_sr_t
self.well_fraction : lambdified version of expr_well_faction
self.t_exp_max : lambdified version of expr_t_max
eta, f_planet, n_pix, f_tot, ron, = sp.symbols("eta, f_{planet}, n_p, f_{tot}, ron", real=True) n_planet, n_tot, t_exp0, t_exp = sp.symbols("n_{planet}, n_{tot}, t_{esxp0}, t_{exp}", real=True)
- reset()[source]
Reset the values of the accumulation of signal in the detector.
Values reset:
self.vals = []
self.acc = 0.
self.runs = 0
self.forensics = {}
self.mean = None
self.std = None
self.exposure = 0.
self.starlight = None
self.planetlight = None
- update_enclosure(wavelength_range, bottom_range=2.55e-06, top_range=5.8e-06, n_ch_enclosure=200)[source]
Arguments: * wavelength_range : [m] the channels for which to compute the flux.
Computation of the cold background self.cold_bg [e-/s/pix] and self.det_sources [e-/s/channel] Also gives self.det_labels for names
- class scifysim.spectrograph.spectrograph(aconfig, lamb_range, n_chan=8)[source]
Bases:
object
- __dict__ = mappingproxy({'__module__': 'scifysim.spectrograph', '__init__': <function spectrograph.__init__>, 'get_spectrum_image': <function spectrograph.get_spectrum_image>, '__dict__': <attribute '__dict__' of 'spectrograph' objects>, '__weakref__': <attribute '__weakref__' of 'spectrograph' objects>, '__doc__': None, '__annotations__': {}})
- __init__(aconfig, lamb_range, n_chan=8)[source]
This class describres the behaviour of a simple spectrograph.
- __module__ = 'scifysim.spectrograph'
- __weakref__
list of weak references to the object (if defined)