Slitless grating (wcc_etc.grating)
Low-resolution slitless grating in a WCC filter slot.
Note
Under development. The grating design (line density, blaze wavelengths, passbands, coatings) and its throughput are still being defined, so the defaults and the results here are provisional and will change.
Model of the two-zone R ~ 20 blazed transmission grating of the WCC grating trade study (G. Furesz, 2026-11-16): a 16-level fused-silica staircase 70 mm in front of the sensor, 4.414 lines/mm, with one passband per half so that first and second orders do not overlap:
"blue": 350-700 nm behind a 700 nm short-pass coating, blaze 430 nm, bands u, g, r;"red": 600-1100 nm behind a 600 nm long-pass coating, blaze 775 nm, bands i, z.
The throughput is the nofilter sensor curve (telescope x WCC contamination
and reserve x detector QE, end of life) times the edge coating times the scalar
diffraction efficiency of the staircase. GratingSimulation renders the
dispersed image of the scene source (all requested orders) and extracts
per-band signal-to-noise in a box along the first order.
Not modelled: static wavefront error (pass psf= for a non-Airy PSF), FSM
smear, the +-3.6% dispersion change across the tilted sensor, extended sources.
- wcc_etc.grating.GRATING_HALVES = {'blue': {'bands': {'g': (400, 550), 'r': (555, 690), 'u': (350, 395)}, 'blaze_nm': 430.0, 'edge_nm': 700.0, 'edge_sign': 1}, 'red': {'bands': {'i': (700, 850), 'z': (835, 1100)}, 'blaze_nm': 775.0, 'edge_nm': 600.0, 'edge_sign': -1}}
blaze wavelength, coating edge (nm; the sign of
edge_signis +1 for a short-pass, -1 for a long-pass), and the first-order extraction bands in nm.- Type:
Design of each half
- exception wcc_etc.grating.GratingDevelopmentWarning[source]
Bases:
UserWarningThe grating ETC is under development: its design parameters are provisional.
Silence with
warnings.simplefilter("ignore", GratingDevelopmentWarning).
- class wcc_etc.grating.GratingSimulation(simulation, half='blue', orders=(-1, 0, 1, 2), lines_per_mm=4.414, distance_mm=70.0, levels=16, coating_peak=0.95, edge_width_nm=15.0, psf=None, psf_npix=65, aperture_mas=70.0)[source]
Bases:
objectETC for one half of the slitless grating on one WCC sensor.
Under development: the design parameters are still being defined and the defaults are provisional.
- Parameters:
simulation (Simulation) – A simulation whose sensor bandpass has no filter (
"zwo:nofilter"or"qcmos:nofilter"); seefrom_sensor_and_scene().half (half and along y (columns) for the red) –
"blue"(350-700 nm; u, g, r) or"red"(600-1100 nm; i, z).orders (tuple of int) – Diffraction orders rendered in the image.
lines_per_mm (float) – Groove density, grating-to-sensor distance and staircase levels.
distance_mm (float) – Groove density, grating-to-sensor distance and staircase levels.
levels (float) – Groove density, grating-to-sensor distance and staircase levels.
coating_peak (float) – In-band transmission and 10-90% edge width of the edge coating.
edge_width_nm (float) – In-band transmission and 10-90% edge width of the edge coating.
psf (PSFSource, optional) – PSF rendered at each wavelength. Default
AiryPSF.psf_npix (int) – Side of the (odd) PSF stamp in pixels.
aperture_mas (float) – Half-width of the extraction box across the dispersion.
blue (Images are returned with the dispersion along x (pixel rows) for the)
half
layout. (as in the baseline)
- classmethod from_sensor_and_scene(kind, scene, half='blue', gain_mode=None, **kwargs)[source]
Build from a sensor kind (
"zwo"/"imx"or"qcmos") and a Scene.
- property cache
Derived rates and images, dropped when the simulation changes.
The simulation replaces its render-cache dict whenever its scene, sensor or telescope are set or updated; a new dict means a new state.
- property plate_scale_mas
Detector plate scale in mas/pixel.
- property dispersion_px_per_nm
First-order dispersion at the sensor in pixels per nm.
- offset_px(wave_nm, order=1)[source]
Distance from the zeroth-order image along the dispersion, in pixels.
- property resolving_power
R = illuminated lines / 1.03 (diffraction-limited, any wavelength).
- efficiency(order=1, wave_nm=None)[source]
Edge coating times staircase efficiency of
order(no telescope/QE).
- spectral_rates()[source]
Scene rates before the grating, on
self.wave_nm.Returns
(point, sky): e-/s/nm of the source plus unresolved contaminants, and e-/s/nm/pixel of the surface-brightness elements. Each value is the mean over its 1 nm bin, integrated over the native wavelength samples of the spectrum, so narrow emission lines keep their integrated flux wherever they fall.
- background_rate_per_pix()[source]
Sky e-/s/pixel: slitless, so every pixel sees the whole passband.
All orders land on the sensor and their efficiencies sum to one in scalar theory, so only the edge coating applies.
- canvas()[source]
Geometry of the dispersion-along-x image:
(ny, nx, x0, y0).(x0, y0)is the pixel of the zeroth-order image. The canvas spans every requested order over the wavelengths the coating passes.
- rate_image(orders=None, psf_step_nm=25.0, source_only=False, oversample=1)[source]
Noiseless e-/s image of the point sources, dispersion along x.
The trace of each
psf_step_nmwavelength bin is laid down at its sub-pixel offsets for every order and convolved with the PSF rendered at the bin centre (with the telescope jitter).source_onlyleaves out unresolved contaminants (e.g. a point-like host). For the red half the PSF is transposed here, so thatoriented()returns it in its detector orientation.oversample(a positive odd integer k) returns the image on a grid of k x k fine pixels per detector pixel, in e-/s per fine pixel, with shape(k * ny, k * nx)for the(ny, nx)ofcanvas(). The zeroth order is on fine pixel(k * y0 + k // 2, k * x0 + k // 2), the centre of detector pixel(y0, x0). Shifting the fine image by whole fine pixels and summing k x k blocks places the source at a sub-pixel position on the detector.
- simulate(time, n_reads=1, add_noise=True, seed=None)[source]
Detector image of one frame stack of total exposure
time(s).Returns a
SimulatedImage(rectangular;npixis the long side). With noise, each of then_readsframes is drawn on its own and a pixel is masked if it saturates in any of them.
- get_peak_pixel(time, n_reads=1)[source]
Brightest-pixel charge per frame (electrons), all orders included.
- is_saturated(time, n_reads=1)[source]
Whether the brightest pixel of a frame reaches
sensor.saturation_e.
- band_coefficients(n_reads=1)[source]
Per band
(A, B, C)withSNR = A t / sqrt(B t + C).The box is
+-aperture_masacross the dispersion by the band length along the first order. A is the first-order rate of the source in the box; B adds the light of the other orders, unresolved contaminants, sky and dark in the box; C is the read-noise variance of the box pixels timesn_reads. Boundary pixels enter with their fractional coveragewin A andw**2in the variances B and C.
- wcc_etc.grating.edge_coating(wave_nm, half, peak=0.95, edge_width_nm=15.0)[source]
Transmission of the order-sorting edge coating of a half.
peakin band, with a logistic edge whose 10-90% width isedge_width_nm(the memo’s assumption; no vendor curve yet).
- wcc_etc.grating.fused_silica_index(wave_nm)[source]
Refractive index of fused silica (Malitson 1965 Sellmeier).
- wcc_etc.grating.staircase_efficiency(wave_nm, order, blaze_nm, levels=16)[source]
Scalar diffraction efficiency of an M-level staircase blazed grating.
For a staircase that approximates a 2 pi blaze at
blaze_nmthe phase depth at another wavelength isalpha = blaze [n(wave)-1] / (wave [n(blaze)-1])periods and the efficiency of order m is (Swanson 1989):sinc^2(m / M) * [sin(pi (alpha - m)) / (M sin(pi (alpha - m) / M))]^2
which tends to
sinc^2(alpha - m)for a continuous blaze.