pypeit.spectrographs.mmt_binospec module

Module for MMT/BINOSPEC specific methods.

class pypeit.spectrographs.mmt_binospec.MMTBINOSPECIFUSpectrograph[source]

Bases: MMTBINOSPECSpectrograph

Child to handle MMT/BINOSPEC IFU specific code.

The Binospec IFU is a fiber-fed integral field unit with a hexagonal lenslet array feeding ~360 fibers per side into the spectrograph. Each side has 40 dedicated sky fibers at the outermost ring of each sub-bundle (indices [0-7, 88-95, 176-183, 264-271, 352-359]).

static _ifu_calib_path()[source]

Return the path to the IFU calibration data directory.

Return type:

PypeItDataPath

_load_ref_spatial_profile(det)[source]

Load the reference spatial profile for cross-correlation.

The reference profile (PROF_REF) is a 1D array representing the summed Gaussian-Hermite profiles of all fibers, stored in extension 3 (IFUPROF) of the reference fiber profile FITS file.

Parameters:

det (int) – 1-indexed detector number (1=side A, 2=side B).

Returns:

1D reference spatial profile.

Return type:

numpy.ndarray

_require_block_slit_match(det, nslits)[source]

Return the reference fiber blocks for det, requiring that their count matches the number of traced block-slits.

The block-slits are defined directly from the static reference fiber profile (one block-slit per FIB_BLOCK), so the traced slit count should always equal the reference block count. Every fiber operation (arc-center snapping, edge adjustment, throughput, sky identification) pairs the i-th reference block with the i-th block-slit positionally. A mismatch means a block-slit was dropped or merged during edge tracing/QA, which breaks that correspondence; continuing would silently misassign fibers, throughputs, and wavelength solutions, so the reduction is faulted instead.

Parameters:
  • det (int) – 1-indexed detector number (1=side A, 2=side B).

  • nslits (int) – Number of traced block-slits.

Returns:

The fiber blocks from get_fiber_blocks().

Return type:

list

Raises:

PypeItError – If the reference block count does not equal nslits.

static _segment_xcorr_offset(det_profile, ref_profile, nmin, nmax, max_lag, ntaper=10, min_corr=0.3, dx_cpeak=4)[source]

Cross-correlate one spatial segment and return its sub-pixel offset.

Helper for match_fibers_to_reference(), invoked once per segment. The segment [nmin, nmax] of the detected and reference profiles is cosine-apodized at both ends, the two are cross-correlated over +/- max_lag pixels and normalized, and the correlation peak is refined by parabolic interpolation. Mirrors the per-segment logic of the IDL pipeline (bino_ifu_fiber_id.pro).

Parameters:
  • det_profile (numpy.ndarray) – Synthetic spatial profile built from the detected fiber positions.

  • ref_profile (numpy.ndarray) – Reference spatial profile.

  • nmin (int) – Inclusive segment boundary columns.

  • nmax (int) – Inclusive segment boundary columns.

  • max_lag (int) – Maximum cross-correlation lag in pixels.

  • ntaper (int, optional) – Width of the cosine taper at each segment end.

  • min_corr (float, optional) – Minimum normalized correlation peak required to accept the segment.

  • dx_cpeak (int, optional) – Required margin (in lag bins) between the peak and the lag-window edge for sub-pixel interpolation.

Returns:

Sub-pixel lag offset of the correlation peak, or np.nan if the segment is rejected (weak correlation or peak too close to the lag-window edge).

Return type:

float

adjust_slit_edges_to_fibers(slits, det)[source]

Shrink slit edges to tightly wrap fiber positions from the reference profile, exposing inter-block gaps for scattered light modeling.

The edge detection places slit boundaries at the midpoints of inter-block gaps (~70 px wide), consuming all off-slit pixels. This method moves the edges inward to the outermost fiber positions + a small margin, leaving ~55-60 px gaps between blocks for the scattered light model.

Parameters:
  • slits (SlitTraceSet) – Slit traces to modify in place.

  • det (int) – 1-indexed detector number (1=side A, 2=side B).

check_frame_type(ftype, fitstbl, exprng=None)[source]

Check for frames of the provided type.

Overrides the parent to ensure only IFU frames (MASK == ‘IFU’) are selected for this spectrograph.

Parameters:
  • ftype (str) – Type of frame to check.

  • fitstbl (astropy.table.Table) – The table with the metadata for one or more frames to check.

  • exprng (list, optional) – Range in the allowed exposure time for a frame of type ftype.

Returns:

Boolean array with the flags selecting the exposures in fitstbl that are ftype type frames.

Return type:

numpy.ndarray

compound_meta(headarr, meta_key)[source]

Methods to generate metadata requiring interpretation of the header data, instead of simply reading the value of a header card.

Parameters:
Returns:

Metadata value read from the header(s).

Return type:

object

config_specific_par(inp, inp_par=None)[source]

Modify the PypeIt parameters to hard-wired values used for specific instrument configurations.

Parameters:
Returns:

Adjusted parameters.

Return type:

ParSet

configuration_keys()[source]

Return the metadata keys that define a unique instrument configuration.

Adds ‘decker’ to the parent keys so that IFU frames are not grouped with MOS frames in the same configuration.

Returns:

List of configuration keys.

Return type:

list

classmethod default_pypeit_par()[source]

Return the default parameters to use for this instrument.

Returns:

Parameters required by all of PypeIt methods.

Return type:

PypeItPar

get_arc_extract_center(slitcen, slits, det)[source]

Snap arc extraction center to the nearest fiber in each block.

The default slitcen is the midpoint of the block-slit edges, which may fall in an inter-fiber gap. A gap-centered extraction with the default 3-pixel boxcar yields a noisy arc spectrum that degrades the wavelength solution for all fibers in the block.

This method shifts each block’s extraction center to the reference fiber position closest to the geometric center.

Parameters:
  • slitcen (numpy.ndarray) – Slit center traces, shape (nspec, nslits).

  • slits (SlitTraceSet) – Slit traces.

  • det (int) – 1-indexed detector number.

Returns:

Adjusted slit center traces, same shape as slitcen.

Return type:

numpy.ndarray

get_block_slit_edges(traceimg, det)[source]

Define block-slit edges from the reference fiber profile.

Instead of using Sobel edge detection (which fails due to scattered light in inter-block gaps), this method defines slit edges at the midpoints between adjacent fiber blocks. A bulk pixel shift is determined by cross-correlating the trace image against the expected fiber pattern.

Parameters:
  • traceimg (numpy.ndarray) – Trace image (raw flat), shape (nspec, nspat).

  • det (int) – 1-indexed detector number.

Returns:

(left_edges, right_edges) arrays of shape

(nspec, nblocks) with constant slit edge positions.

Return type:

tuple

get_fiber_blocks(det)[source]

Return the fiber block structure from the reference profile.

Each block is a group of fibers that will become a single “slit” in the block-slit extraction approach. Blocks are defined by the FIB_BLOCK column in the reference profile.

Parameters:

det (int) – 1-indexed detector number (1=side A, 2=side B).

Returns:

One dict per block with keys:
  • ’block_id’: int, block number from reference profile

  • ’nfibers’: int, number of fibers in block

  • ’type’: str, ‘sky’ or ‘science’

  • ’fiber_positions’: ndarray, reference pixel positions (TR_PIX)

  • ’fiber_names’: list of str, fiber names

  • ’fiber_ids’: ndarray, fiber IDs

  • ’min_pix’: float, minimum pixel position in block

  • ’max_pix’: float, maximum pixel position in block

Return type:

list of dict

get_fiber_metadata(det, slit_spat_ids, slit_centers=None)[source]

Map detected fiber traces to Binospec IFU fiber identifiers.

Uses cross-correlation of detected trace positions against the reference fiber profile to assign physical fiber IDs and names.

See base class for parameter and return value documentation.

Parameters:

slit_centers (numpy.ndarray, optional) – Float-valued slit center positions at the spectral midpoint. If provided, these are used instead of the integer slit_spat_ids for more accurate fiber matching.

get_fiber_position_shift(slits, det)[source]

Measure the bulk shift between reference fiber positions and the observed slit traces.

The Binospec IFU slit definitions are built from the static reference fiber profile, shifted to match the observed trace image. Any later fiber extraction must apply the same shift to the reference fiber centers; otherwise apertures are centered on the unshifted reference positions.

Parameters:
  • slits (SlitTraceSet) – Observed block-slit traces.

  • det (int) – 1-indexed detector number (1=side A, 2=side B).

Returns:

Bulk spatial shift in detector pixels.

Return type:

float

get_ifu_datacube_meta(raw_hdr)[source]

Return datacube header/WCS metadata for the Binospec fiber IFU.

Binospec has a single fiber-IFU mode, so the returned label is fixed. See pypeit.spectrographs.spectrograph.Spectrograph.get_ifu_datacube_meta().

Parameters:

raw_hdr (astropy.io.fits.Header) – Primary header of the input file (unused; Binospec has one mode).

Returns:

{'name': 'BINOSPEC IFU', 'mode': 'FIBER'}.

Return type:

dict

get_science_fiber_layout_indices(det, fiber_ids, fiber_types)[source]

Map detected fibers to layout file indices using fiber IDs.

Uses fiber IDs from get_fiber_metadata() to look up each fiber’s name in the reference profile, then matches that name to the layout file entry. This works correctly even when fibers are missing from the input data.

The layout file (bino_IFU_sky_layout.fits) contains 640 entries (indices 0-319 for side A, 320-639 for side B). Live science fibers from the reference profile are sorted by detector position and paired with live layout entries: in forward order for side A, and in reverse order for side B (because the two detectors produce mirror-image spectra). Dead fibers (_DEAD suffix) are excluded from both lists so they do not disrupt the pairing.

Parameters:
  • det (int) – 1-indexed detector number (1=side A, 2=side B).

  • fiber_ids (numpy.ndarray) – Physical fiber IDs for each detected fiber, from fiber_meta['fiber_id']. Unmatched fibers have ID < 0.

  • fiber_types (numpy.ndarray) – Fiber type strings ('SCI', 'SKY', or 'UNKNOWN'), from fiber_meta['fiber_type'].

Returns:

Array of shape (nfibers,) with layout file indices (0-639) for each fiber. Sky, dead, and unmatched fibers are assigned -1.

Return type:

numpy.ndarray

identify_fibers_in_block(det, block_idx, detected_positions)[source]

Identify fibers within a block-slit by matching detected peak positions to reference fiber positions.

Parameters:
  • det (int) – 1-indexed detector number.

  • block_idx (int) – 0-based block index.

  • detected_positions (numpy.ndarray) – Detected fiber peak pixel positions within the block-slit, sorted by position.

Returns:

Keys ‘fiber_id’, ‘fiber_name’, ‘fiber_type’ — arrays

aligned with detected_positions. Unmatched fibers get fiber_id=-1, fiber_name=’UNKNOWN’, fiber_type=’unknown’.

Return type:

dict

ifu_fiber_pitch = 0.6
static ifu_sky_wcs(raw_hdr, scale_arcsec)[source]

Build the celestial reference coordinate and CD matrix for the IFU.

Encapsulates the single TAN/POSANG sign convention shared by the datacube builder and the 1D fiber extractor so the two stay in sync. The returned 2x2 CD matrix maps a (+x east, +y north) instrument offset of scale_arcsec arcsec per unit step to RA/Dec degrees.

Parameters:
  • raw_hdr (astropy.io.fits.Header) – Primary header providing RA, DEC and (optionally) POSANG.

  • scale_arcsec (float) – Spatial scale in arcsec per unit step along the WCS axes.

Returns:

init_meta()[source]

Define how metadata are derived from the spectrograph files.

Extends the parent class metadata with IFU-specific fields required by the Fiber pipeline (atmospheric parameters for DAR correction).

load_fiber_illumination(det)[source]

Load the fiber-to-fiber illumination correction (throughput map).

Parameters:

det (int) – 1-indexed detector number (1=side A, 2=side B).

Returns:

Relative illumination correction per fiber (nfibers,).

Return type:

numpy.ndarray

load_fiber_ref_profile(det)[source]

Load the reference fiber trace profile for fiber identification.

The reference profile contains the expected pixel positions and Gaussian-Hermite profile parameters for each fiber, obtained from a high-quality flat field observation. This is used to cross-match detected fiber traces against known fiber IDs.

Parameters:

det (int) – 1-indexed detector number (1=side A, 2=side B).

Returns:

Table with columns:

FIB_ID, X, Y, SIDE, FIB_NAME, FIB_TYPE, FIB_BLOCK, FIB_DEAD_FLAG, TR_A0, TR_PIX, TR_SIGMA, TR_BGR, TR_H3, TR_H4, TR_H5, TR_H6.

Return type:

astropy.io.fits.FITS_rec

load_sky_layout()[source]

Load the IFU fiber-to-sky position mapping.

Returns the on-sky x,y positions (in arcsec) for all 640 fibers in the hexagonal IFU field of view.

Returns:

Return type:

tuple

match_fibers_to_reference(det, detected_positions)[source]

Cross-match detected fiber trace positions against the reference profile to assign physical fiber IDs.

Follows the algorithm from the IDL pipeline (bino_ifu_fiber_id.pro):

  1. Build a synthetic spatial profile from detected positions.

  2. Cross-correlate against the reference profile in 5 segments with cosine apodization.

  3. Fit a linear polynomial to the segment offsets to capture position-dependent shifts (flexure, scale, distortion).

  4. Match individual fibers using a distance threshold after applying the per-trace polynomial shift.

Parameters:
  • det (int) – 1-indexed detector number (1=side A, 2=side B).

  • detected_positions (numpy.ndarray) – Detected fiber center positions in pixels at a reference column (e.g., center of detector).

Returns:

  • fiber_ids (numpy.ndarray): Physical fiber IDs for each detected trace, or -1 if unmatched.

  • is_sky (numpy.ndarray): Boolean array, True for sky fibers.

  • is_dead (numpy.ndarray): Boolean array, True for dead fibers in the reference that were not detected.

Return type:

tuple

measure_fiber_flat_flux(flatimg, slits, det)[source]

Measure integrated flat field flux for each fiber within block-slits.

Used to compute the bulk throughput ratio between sky fibers (bare) and science fibers (lenslet-fed).

Parameters:
  • flatimg (numpy.ndarray) – Flat field image, shape (nspec, nspat).

  • slits (SlitTraceSet) – Block-slit traces (21 per detector).

  • det (int) – 1-indexed detector number.

Returns:

Dictionary with keys:
  • ’fiber_flux’: per-fiber integrated flat flux (nfibers,)

  • ’fiber_type’: per-fiber type (‘sky’ or ‘science’)

  • ’sky_avg’: mean flux of sky fibers

  • ’sci_avg’: mean flux of science fibers

  • ’bulk_scale’: sci_avg / sky_avg (scalar)

Return type:

dict

name = 'mmt_binospec_ifu'

The name of the spectrograph. See Spectrographs for the currently supported spectrographs.

nfibers_a = 360
nfibers_b = 356
pypeline = 'Fiber'

String used to select the general pipeline approach for this spectrograph.

subtract_scattered_light_gaps(image, offslitmask)[source]

Subtract scattered light by measuring signal in inter-block gaps and interpolating across fiber blocks.

For each spectral bin, measures the median signal in each off-slit gap region and linearly interpolates a smooth scattered light model across the spatial direction.

Parameters:
  • image (numpy.ndarray) – 2D image (nspec, nspat) to measure scattered light from.

  • offslitmask (numpy.ndarray) – Boolean mask, True for off-slit (gap) pixels.

Returns:

2D scattered light model, same shape as image.

Return type:

numpy.ndarray

supported = True

Flag that PypeIt code base has been sufficiently tested with data from this spectrograph that it is officially supported by the development team.

url = 'https://www.mmto.org/instrument-suite/binospec/binospec-ifu-information/'

Reference url

class pypeit.spectrographs.mmt_binospec.MMTBINOSPECSpectrograph[source]

Bases: Spectrograph

Child to handle MMT/BINOSPEC specific code

static _parse_slitmask_data(filename, det)[source]
bino_get_slit_region(filename, det=None, Nx=4096, Ny=4112, pady=0)[source]

Compute the pixel-space rectangular regions for each slit in a Binospec mask.

This function reads the slitmask design from a FITS file (or an already-loaded SlitMask object), converts slit and object positions from mask coordinates to pixel coordinates, and determines the x/y pixel boundaries for each slit on the detector. It returns these boundaries along with the updated slitmask object.

Parameters:
  • filename (str) – Path to the slitmask FITS file. Must be provided unless the slitmask is already loaded via self.get_slitmask.

  • det (int, optional) – Detector number (1 or 2). Must be specified.

  • Nx (int, optional) – Detector size in the x-direction (default: 4096 pixels).

  • Ny (int, optional) – Detector size in the y-direction (default: 4112 pixels).

  • pady (float, optional) – Additional padding (in pixels) applied to the slit boundaries (default: 0).

Returns:

  • region (list) – A list containing: - slit_x_range : array of x-boundaries for each slit [Nslits, 2] - slit_y_range : array of y-boundaries for each slit [Nslits, 2] - x_slitobj_pix : array of x pixel positions for slit objects - y_slitobj_pix : array of y pixel positions for slit objects

  • slitmask (SlitMask) – The updated SlitMask object containing slit geometry and metadata.

Notes

  • Converts mask coordinates to pixel coordinates using the appropriate scale factor.

  • Handles detector 2 by reversing slit order and applying a vertical flip.

  • Slit boundaries are clipped to remain within detector dimensions.

bpm(filename, det, shape=None, msbias=None)[source]

Generate a default bad-pixel mask.

Loads a pre-built static BPM from the IDL pipeline calibration data (badpix_binospec.fits + hard-coded bad columns and detector trap regions from bino_mosaic.pro).

Even though they are both optional, either the precise shape for the image (shape) or an example file that can be read to get the shape (filename using get_image_shape()) must be provided.

Parameters:
  • filename (str or None) – An example file to use to get the image shape.

  • det (int) – 1-indexed detector number to use when getting the image shape from the example file.

  • shape (tuple, optional) – Processed image shape Required if filename is None Ignored if filename is not None

  • msbias (numpy.ndarray, optional) – Processed bias frame used to identify bad pixels

Returns:

An integer array with a masked value set to 1 and an unmasked value set to 0. All values are set to 0.

Return type:

numpy.ndarray

camera = 'BINOSPEC'

Name of the spectrograph camera or arm. This is used by specdb, so use that naming convention

check_frame_type(ftype, fitstbl, exprng=None)[source]

Check for frames of the provided type.

Parameters:
Returns:

Boolean array with the flags selecting the exposures in fitstbl that are ftype type frames.

Return type:

numpy.ndarray

compound_meta(headarr, meta_key)[source]

Methods to generate metadata requiring interpretation of the header data, instead of simply reading the value of a header card.

Parameters:
Returns:

Metadata value read from the header(s).

Return type:

object

config_specific_par(inp, inp_par=None)[source]

Modify the PypeIt parameters to hard-wired values used for specific instrument configurations.

Parameters:
Returns:

The PypeIt parameter set adjusted for configuration specific parameter values.

Return type:

ParSet

configuration_keys()[source]

Return the metadata keys that define a unique instrument configuration.

This list is used by PypeItMetaData to identify the unique configurations among the list of frames read for a given reduction.

Returns:

List of keywords of data pulled from file headers and used to constuct the PypeItMetaData object.

Return type:

list

classmethod default_pypeit_par()[source]

Return the default parameters to use for this instrument.

Returns:

Parameters required by all of PypeIt methods.

Return type:

PypeItPar

get_detector_par(det, hdu=None)[source]

Return metadata for the selected detector.

Parameters:
  • det (int) – 1-indexed detector number.

  • hdu (astropy.io.fits.HDUList, optional) – The open fits file with the raw image of interest. If not provided, frame-dependent parameters are set to a default.

Returns:

Object with the detector metadata.

Return type:

DetectorContainer

get_maskdef_slitedges(filename=None, det=1, debug=None, binning=None, trc_path=None)[source]

Provides the slit edges positions predicted by the slitmask design.

This method is not defined for all spectrographs. This base-class method raises an exception. This may be because use_maskdesign has been set to True for a spectrograph that does not support it.

Parameters:
  • filename (str, list, optional:) – Name of the file holding the mask design info or the maskfile and wcs_file in that order

  • det (int, optional) – Detector number

  • debug (bool, optional) – Flag to run in debugging mode

  • trc_path (str, optional) – Path to the first trace file used to generate the trace flat

  • binning (str, optional) – String with the comma-separated number of pixels binned in each dimension of the flat-field image. Order must be spectral then spatial.

Returns:

  • top_edges (numpy.ndarray) – Predicted locations of the top edges of the slits in spatial pixel coordinates.

  • bot_edges (numpy.ndarray) – Predicted locations of the bottom edges of the slits in spatial pixel coordinates.

  • sortindx (numpy.ndarray) – Indices of the slits in the provided slitmask object that orders the slits from left to right, in the PypeIt orientation.

  • slitmask (SlitMask) – Slit mask metadata read from the provided input file(s).

Notes

  • Edges are sorted by bottom edge y-coordinate to order slits spatially.

get_rawimage(raw_file, det)[source]

Read raw images and generate a few other bits and pieces that are key for image processing.

Parameters:
  • raw_file (str) – File to read

  • det (int) – 1-indexed detector to read

Returns:

  • detector_par (pypeit.images.detector_container.DetectorContainer) – Detector metadata parameters.

  • raw_img (numpy.ndarray) – Raw image for this detector.

  • hdu (astropy.io.fits.HDUList) – Opened fits file

  • exptime (float) – Exposure time read from the file header

  • rawdatasec_img (numpy.ndarray) – Data (Science) section of the detector as provided by setting the (1-indexed) number of the amplifier used to read each detector pixel. Pixels unassociated with any amplifier are set to 0.

  • oscansec_img (numpy.ndarray) – Overscan section of the detector as provided by setting the (1-indexed) number of the amplifier used to read each detector pixel. Pixels unassociated with any amplifier are set to 0.

get_slitmask(filename, det=1)[source]

Parse the slitmask data from a raw file into slitmask, a SlitMask object.

Parameters:
  • filename (str) – Name of the file to read.

  • det (int, optional) – 1-indexed detector number to read the slitmask for. Must be either 1 or 2 for MMT/Binospec.

Returns:

The slitmask data read from the file. The returned object is the same as slitmask.

Return type:

SlitMask

Notes

  • Target-slit alignment is characterized via distances from slit edges.

  • Slit corners and on-sky positions are stored for each target.

header_name = 'Binospec'

Name of the spectrograph camera or arm from the Header. Usually the INSTRUME card.

init_meta()[source]

Define how metadata are derived from the spectrograph files.

That is, this associates the PypeIt-specific metadata keywords with the instrument-specific header cards using meta.

name = 'mmt_binospec'

The name of the spectrograph. See Spectrographs for the currently supported spectrographs.

ndet = 2

Number of detectors for this instrument.

nonlinearity_coeffs = array([[ 0.00000000e+00,  1.00400089e+00, -1.39235362e-06,          8.31711824e-12, -1.20653479e-17],        [ 0.00000000e+00,  1.00361458e+00, -1.29223833e-06,          6.93723177e-12, -9.67406255e-18],        [ 0.00000000e+00,  1.00269542e+00, -9.29361806e-07,          5.97902827e-12, -2.30257302e-17],        [ 0.00000000e+00,  1.00339616e+00, -8.47134521e-07,          7.92441693e-12, -4.46542834e-17],        [ 0.00000000e+00,  1.00727205e+00, -1.69093388e-06,          2.07225055e-11, -1.62655178e-16],        [ 0.00000000e+00,  1.00858745e+00, -2.35668901e-06,          2.40641019e-11, -1.50286358e-16],        [ 0.00000000e+00,  1.00728526e+00, -1.80779473e-06,          1.73427719e-11, -1.01685780e-16],        [ 0.00000000e+00,  1.00845168e+00, -2.02050567e-06,          2.97587091e-11, -2.65508521e-16]])
plot_mask(filename, det=None, save_dir=None)[source]

Plot the slit mask layout and target positions for one or both detectors.

This function retrieves slit region data for a given Binospec mask and plots the rectangular slit outlines and target positions for detector 1, detector 2, or both. It is useful for visually validating mask design and target alignment.

Parameters:
  • filename (str) – Path to the mask design file (e.g., a JSON file containing slit definitions).

  • det (int or str) – Specifies which detector(s) to plot. Accepts 1, 2, or ‘both’.

  • save_dir (str, optional) – If provided, the plot will be saved as a PNG in the given directory.

Returns:

  • region_1 (tuple, optional) – Slit region and target position data for detector 1, if requested.

  • region_2 (tuple, optional) – Slit region and target position data for detector 2, if requested.

raw_header_cards()[source]

Return additional raw header cards to be propagated in downstream output files for configuration identification.

The list of raw data FITS keywords should be those used to populate the configuration_keys() or are used in config_specific_par() for a particular spectrograph, if different from the name of the PypeIt metadata keyword.

This list is used by subheader_for_spec() to include additional FITS keywords in downstream output files.

Returns:

List of keywords from the raw data files that should be propagated in output files.

Return type:

list

supported = True

Flag that PypeIt code base has been sufficiently tested with data from this spectrograph that it is officially supported by the development team.

telescope = Parameter     Value                Default  Type        Callable ---------------------------------------------------------------- name          MMT                  KECK     str         False    longitude     -110.87750000000003  None     int, float  False    latitude      31.68094444444444    None     int, float  False    elevation     2319.9999999995903   None     int, float  False    fratio        None                 None     int, float  False    diameter      6.5                  None     int, float  False    eff_aperture  None                 None     int, float  False   

Instance of TelescopePar providing telescope-specific metadata.

update_edgetracepar(par)[source]

This method is used in pypeit.edgetrace.EdgeTraceSet.maskdesign_matching() to update EdgeTraceSet parameters when the slitmask design matching is not feasible because too few slits are present in the detector.

Parameters:

par (pypeit.par.pypeitpar.EdgeTracePar) – The parameters used to guide slit tracing.

Returns:

pypeit.par.pypeitpar.EdgeTracePar The modified parameters used to guide slit tracing.

url = 'https://www.mmto.org/instrument-suite/binospec/binospec-information-for-users/'

Reference url

pypeit.spectrographs.mmt_binospec._plot_region(ax, region, color, side_label)[source]
pypeit.spectrographs.mmt_binospec.binospec_read_amp(inp, ext)[source]

Read one amplifier of an MMT BINOSPEC multi-extension FITS image

Parameters:
  • inp (str, astropy.io.fits.HDUList) – The input FITS file name or already opened HDU list.

  • ext (int) – FITS extension to read

Returns:

  • data (numpy.ndarray) – Array with data from the data section of the image.

  • overscan (numpy.ndarray) – Array with the overscan section of the image.

  • datasec (str) – String with the data section in IRAF format, e.g. ‘[x1:x2,y1:y2]’.

  • biassec (str) – String with the bias section in IRAF format, e.g. ‘[x1:x2,y1:y2]’.