Table Of Contents

Previous topic

Welcome to Euclid Visible InStrument (VIS) Python Package (VIS-PP) Documentation

Next topic

Postprocessing Tools

VIS Instrument Model

The file provides a function that returns VIS related information such as pixel size, dark current, gain, zeropoint, and sky background.

requires:NumPy
requires:numexpr
author:Sami-Matias Niemi
contact:s.niemi@ucl.ac.uk
version:0.7
support.VISinstrumentModel.CCDnonLinearityModel(data)

This function provides a non-linearity model for a VIS CCD273.

The non-linearity is modelled based on the results presented in MSSL/Euclid/TR/12001 issue 2. Especially Fig. 5.6, 5.7, 5.9 and 5.10 were used as an input data. The shape of the non-linearity is assumed to follow a parabola (although this parabola has a break, see the note below). The MSSL report indicates that the residual non-linearity is on the level of +/-25 DN or about +/- 0.04 per cent over the measured range. This function tries to duplicate this effect.

Note

There is a break in the model around 22000e. This is because the non-linearity measurements performed thus far are not extremely reliable below 10ke (< 0.5s exposure). However, the assumption is that at low counts the number of excess electrons appearing due to non-linearity should not be more than a few.

Parameters:data (ndarray) – data to which the non-linearity model is being applied to
Returns:input data after conversion with the non-linearity model
Return type:float or ndarray
support.VISinstrumentModel.CCDnonLinearityModelSinusoidal(data, amplitude, phase=0.49, multi=1.5)

This function provides a theoretical non-linearity model based on sinusoidal error with a given amplitude, phase and number of waves (multi).

Parameters:
  • data (ndarray) – data to which the non-linearity model is being applied to
  • amplitude (float) – amplitude of the sinusoidal wave
  • phase (float) – phase of the sinusoidal wave
  • multi (float) – the number of waves to have over the dynamical range of the CCD
Returns:

input data after conversion with the non-linearity model

Return type:

ndarray

support.VISinstrumentModel.VISinformation()

Returns a dictionary describing VIS. The following information is provided (id: value - reference):

apCorrection: 0.925969 - derived using VIS system PSF (see EUCL-MSS-RP-6-001)
aperture_size: 132.73228961416876 - derived (radiometric_model_reference_phase4_JA110415_2_MSSL_version)
beta: 0.6 - CDM03 (Short et al. 2010)
bias: 500.0 - ROE Requirements Specification (EUCL-MSS-RD-6-009)
cosmic_bkgd: 0.172 - derived (radiometric_model_reference_phase4_JA110415_2_MSSL_version)
dark: 0.001 - CCD spec EUCL-EST-RS-6-002
diameter: 1.3 - radiometric_model_reference_phase4_JA110415_2_MSSL_version
dob: 0 - CDM03 (Short et al. 2010)
e_adu: 3.1 - ROE Requirements Specification (EUCL-MSS-RD-6-009)
fullwellcapacity: 200000 - CCD spec (for simulator)
fwc: 200000 - CCD spec EUCL-EST-RS-6-002 (for CDM03)
gain: 3.1 - ROE Requirements Specification (EUCL-MSS-RD-6-009)
galaxy_fraction: 0.836 - radiometric_model_reference_phase4_JA110415_2_MSSL_version
magzero: 15861729325.3279 - derived, see belowCDM (VIS ETC)
ovrscanx: 20 - ROE Requirements Specification (EUCL-MSS-RD-6-009) (req: CalCD-B)
peak_fraction: 0.261179 - derived
pixel_size: 0.1 - CCD spec EUCL-EST-RS-6-002
prescanx: 50 - CCD spec EUCL-EST-RS-6-002 (also in CalCD-B)
rdose: 30000000000.0 - derived (above the PLM requirement)
readnoise: 4.5 - WL requirement (PERD R-VIS-P-021)
readout: 4.5 - WL requirement (PERD R-VIS-P-021)
readtime: 88.0 - derived; ROE Requirements Specification (EUCL-MSS-RD-6-009)
sfwc: 730000.0 - CDM03 (Short et al. 2010), see also the CCD spec EUCL-EST-RS-6-002
sky_background: 22.3203 - radiometric_model_reference_phase4_JA110415_2_MSSL_version
sky_high: 21.7206 - radiometric_model_reference_phase4_JA110415_2_MSSL_version
sky_low: 22.9207 - radiometric_model_reference_phase4_JA110415_2_MSSL_version
st: 5e-06 - CDM03 (Short et al. 2010)
star_fraction: 0.928243 -  derived using VIS system PSF (see EUCL-MSS-RP-6-001)
svg: 1e-10 - CDM03 (Short et al. 2010)
t: 0.01024 - CDM03 (Short et al. 2010)
trapfile: cdm_euclid.dat - CDM03 (derived, refitted to CCD204 data)
vg: 6e-11 - CDM03 (Short et al. 2010)
vth: 11680000.0 - CDM03 (Short et al. 2010)
xsize: 2048 - CCD spec EUCL-EST-RS-6-002
ysize: 2066 - CCD spec EUCL-EST-RS-6-002
zeropoint: 25.50087633632 - VIS ETC
zeropointNoObscuration: 25.57991044453 - radiometric_model_reference_phase4_JA110415_2_MSSL_version
zodiacal: 22.3203 - VIS ETC

The magzero was calculated as follows:

1./10**(-0.4*(25.45338546114)) = 15182880871.225231

The throughput input values are derived from two Excel Spreadsheets namely:

  1. 110413_EUC_TN_00051_SYS_PERF_REF_iss4.xlsx
  2. radiometric_model_reference_phase4_JA110415_2_MSSL_version
Returns:instrument model parameters
Return type:dict
support.VISinstrumentModel.testNonLinearity()

A simple test to plot the current non-linearity model.

MTF and PSF

These functions can be used to address the CCD requirements, which are written for an MTF while PERD requirements are for a PSF.

Note

The frequency nu_0 is the Nyquist limit for the CCD, which is defined as: nu_0 = 1 / (2p) , where p is the pixel pitch in mm. Hence, for VIS the nu_0 is about 41.666.

Some links: http://www.dspguide.com/CH25.PDF http://home.fnal.gov/~neilsen/notebook/astroPSF/astroPSF.html#sec-5 http://mathworld.wolfram.com/FourierTransformGaussian.html https://github.com/GalSim-developers/GalSim/wiki/Optics-Module-usage http://www.e2v.com/e2v/assets/File/documents/imaging-space-and-scientific-sensors/Papers/ccdtn105.pdf http://aberrator.astronomy.net/html/mtf.html

sandbox.MTF.FWHM(sigma)

Calculates FWHM from sigma assuming a Gaussian profile.

Parameters:sigma – standard deviation
Returns:FWHM
sandbox.MTF.GaussianAnimation(array_shape=(512, 512), frames=15)

Animation showing how MTF changes as the size of the Gaussian PSF grows.

Parameters:
  • array_shape – size of the simulation array
  • frames – number of frames in the animation
Returns:

None

sandbox.MTF.MTF(wf)

Derives an MTF from pupil image.

Parameters:wf
Returns:MTF
sandbox.MTF.PSF(wf, array_shape=(512, 512), flux=1.0, dx=1.0)

Derives a PSF from pupil image.

Parameters:
  • wf
  • array_shape
  • flux
  • dx
Returns:

sandbox.MTF.circular2DGaussian(array_size, sigma)

Create a circular symmetric Gaussian centered on x, y.

Parameters:sigma (float) – standard deviation of the Gaussian, note that sigma_x = sigma_y = sigma
Returns:circular Gaussian 2D
Return type:ndarray
sandbox.MTF.compareAnalytical(array_shape=(256, 256), nyq=16.0)

Compares an analytical derivation of FWHM - MTF relation to numerical solution. This is only valid for Gaussian PSFs.

Parameters:
  • array_shape
  • nyq – cutout frequency (16)
Returns:

None

sandbox.MTF.kxky(array_shape=(256, 256))

Return the tuple kx, ky corresponding to the DFT of a unit integer-sampled array of input shape.

Uses the SBProfile conventions for Fourier space, so k varies in approximate range (-pi, pi]. Uses the most common DFT element ordering conventions (and those of FFTW), so that (0, 0) array element corresponds to (kx, ky) = (0, 0).

See also the docstring for np.fftfreq, which uses the same DFT convention, and is called here, but misses a factor of pi.

Adopts Numpy array index ordering so that the trailing axis corresponds to kx, rather than the leading axis as would be expected in IDL/Fortran. See docstring for numpy.meshgrid which also uses this convention.

@param array_shape the Numpy array shape desired for kx, ky.

sandbox.MTF.pupilImage(array_shape=(512, 512), size=1.0, dx=1.0)

Generates a pupil image.

Parameters:
  • array_shape
  • size
  • dx
Returns:

sandbox.MTF.requirement(alpha=0.2, w=2.0)

Plots the requirements, both for PSF and MTF and compares them.

Parameters:
  • alpha – power law slope
  • w – wavenumber
Returns:

None

sandbox.MTF.roll2d(image, (iroll, jroll))

Perform a 2D roll (circular shift) on a supplied 2D numpy array, conveniently.

@param image the numpy array to be circular shifted. @param (iroll, jroll) the roll in the i and j dimensions, respectively.

@returns the rolled image.