scopesim.optics.fov_manager_utils module

scopesim.optics.fov_manager_utils.combine_wavesets(*wavesets)[source]

Join and sorts several sets of wavelengths into a single 1D array.

Parameters:
wavesetsone or more iterables

A group of wavelength arrays or lists

Returns:
wave_setnp.ndarray

Combined set of wavelengths

scopesim.optics.fov_manager_utils.get_3d_shifts(effects, **kwargs)[source]

Returns the total 3D shifts (x,y,lam) from a series of Shift3D objects

Parameters:
effectslist of Shift3D effects
Returns:
shift_dictdict

returns the x, y shifts for each wavelength in the fov_grid, where fov_grid contains the edge wavelengths for each spectral layer

Notes

Units returned by fov_grid(): - wavelength: [um] - x_shift, y_shift: [deg]

scopesim.optics.fov_manager_utils.get_imaging_fovs(headers, waveset, shifts, **kwargs)[source]

Return a generator of FieldOfView objects.

Parameters:
headerslist of fits.Header objects

Headers giving spatial extent of each FOV region

wavesetlist of floats

[um] N+1 wavelengths for N spectral layers

shiftslist of tuples (or actually arrays?)

[deg] x,y shifts w.r.t to the optical axis plane. N shifts for N spectral layers

Returns:
fovsgenerator of FieldOfView objects
scopesim.optics.fov_manager_utils.get_imaging_headers(effects, **kwargs)[source]

Return a generator of Header objects for each of the FieldOfVIew objects.

Parameters:
effectslist of Effect objects

Should contain all effects which return a header defining the extent of their spatial coverage

Returns:
hdrsgenerator of Header objects

Notes

FOV headers use the return values from the <Effect>.fov_grid() method. The fov_grid dict must contain the entry edges

This may change in future versions of ScopeSim

scopesim.optics.fov_manager_utils.get_imaging_waveset(effects_list, **kwargs)[source]

Returns the edge wavelengths for the spectral layers needed for simulation

Parameters:
effects_listlist of Effect objects
Returns:
wave_bin_edgeslist

[um] list of wavelengths

scopesim.optics.fov_manager_utils.get_spectroscopy_fovs(headers, shifts, effects=None, **kwargs)[source]

Return a generator of FieldOfView objects.

scopesim.optics.fov_manager_utils.get_spectroscopy_headers(effects, **kwargs)[source]

Return generator of Header objects.