scopesim.optics.fov.FieldOfView1D#

class scopesim.optics.fov.FieldOfView1D(header, waverange, detector_header=None, cmds=None, **kwargs)#

Bases: FieldOfView

For inkoherent MOS instruments, output 1D spectrum.

Added in version 0.11.0: Split FieldOfView into nD-subclasses.

__init__(header, waverange, detector_header=None, cmds=None, **kwargs)#

Methods

__init__(header, waverange[, ...])

extract_area_from_imagehdu(imagehdu, corners)

Extract the part of a ImageHDU that fits inside the FOV volume.

extract_area_from_table(table, minmax)

Extract the entries of a Table that fit inside the FOV volume.

extract_from(src)

Extract relevent fields from source object.

flatten()

If cube, collapse along first axis.

get_corners([new_unit])

Return sky footprint, image plane footprint.

get_fields_in_fov(fields)

Return True if Source.field footprint is inside FOV footprint.

make_hdu()

TBA.

plot(axes[, units])

Plot FOV footprint.

plot_data()

Plot spectrum data if already exists.

view([sub_pixel])

Force the self.fields to be viewed as a single object.

Attributes

area

Return meta["area"] from cmds.

data

Return either hdu.data, image, cube, spectrum or None.

pixel_area

Return the area in arcsec**2 covered by one pixel.

spectra

Return a collection of all fields' spectra.

spline_order

Return "!SIM.computing.spline_order" from cmds.

sub_pixel

Return meta["sub_pixel"] from cmds.

trace_id

Return the name of the trace.

wavelength

Return central wavelength in um.

waverange

Return wavelength range in um [wave_min, wave_max].

waveset

Return a wavelength vector in um.

property area: float#

Return meta[“area”] from cmds.

property data#

Return either hdu.data, image, cube, spectrum or None.

extract_area_from_imagehdu(imagehdu, corners)#

Extract the part of a ImageHDU that fits inside the FOV volume.

Parameters:
  • imagehdu (fits.ImageHDU) – The field ImageHDU, either an image or a cube with wavelength [um].

  • corners (quantity) – From FOV corners in deg.

Returns:

new_imagehdu

Return type:

fits.ImageHDU

static extract_area_from_table(table, minmax)#

Extract the entries of a Table that fit inside the FOV volume.

Parameters:
  • table (table.Table) – The field table.

  • minmax (quantity) – From FOV corners in the form of [[xmin, ymin], [xmax, ymax]].

Returns:

cut_table – Table reduced to sources inside the FOV.

Return type:

table.Table

extract_from(src) None#

Extract relevent fields from source object.

Parameters:

src (Source) – Input Source object to be “observed”.

Return type:

None

Notes

Spectra are cut and copied from the original Source object. They are in original units. ph/s/pix comes in the make_**** methods.

This method assumes that Bandpass has been applied.

flatten()#

If cube, collapse along first axis.

get_corners(new_unit: str = None)#

Return sky footprint, image plane footprint.

get_fields_in_fov(fields: Iterable[SourceField]) Generator#

Return True if Source.field footprint is inside FOV footprint.

make_hdu()#

TBA.

This is needed for when we do incoherent MOS instruments. Each fibre doesn’t care about the spatial information.

Returns:

spec – [PHOTLAM]

Return type:

SourceSpectrum

property pixel_area#

Return the area in arcsec**2 covered by one pixel.

plot(axes, units: str = 'arcsec') None#

Plot FOV footprint.

plot_data()#

Plot spectrum data if already exists.

Added in version 0.11.0.

property spectra: dict[int, SourceSpectrum]#

Return a collection of all fields’ spectra.

Deprecated since version 0.10.0: Use individual fields’ spectra instead.

property spline_order: int#

Return “!SIM.computing.spline_order” from cmds.

property sub_pixel: bool#

Return meta[“sub_pixel”] from cmds.

property trace_id#

Return the name of the trace.

view(sub_pixel: bool | None = None)#

Force the self.fields to be viewed as a single object.

Parameters:

sub_pixel (bool | None, optional) – If None (the default), use value from meta.

Returns:

  • self.hdu (fits.ImageHDU, synphot.SourceSpectrum)

  • .. versionchanged:: 0.11.0 – Removed hdu_type and use_photlam arguments, this is now handled by the subclasses.

property wavelength#

Return central wavelength in um.

property waverange#

Return wavelength range in um [wave_min, wave_max].

property waveset#

Return a wavelength vector in um.