MUSE_FLAT(7)

πŸ“¦
version 2.8.7 Β· 2 versions
, in debian bookworm, ubuntu noble

✨ MUSE_FLAT(7) β€” the flat-field recipe, bestie edition ✨

okay so real talk, this is muse_flat from the muse recipes manual (that's the MUSE_FLAT(7) bit if you were wondering, section 7, we stay scholarly πŸ’…). It's the glow-up-your-flats recipe and it's genuinely so good.


🌸 NAME 🌸

muse_flat β€” Combine several separate flat images into one master flat file, trace slice locations, and locate dark pixels.


πŸŽ€ SYNOPSIS πŸŽ€

esorex muse_flat [OPTIONS] FILE.sof

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically this recipe takes a bunch of separate flat-field images and combines them into one master flat-field file, and while it's at it, it traces where the slices actually live on the CCD. Two-for-one, iconic behaviour honestly.

The master flat contains the combined pixel values of the raw flat exposures, following whatever image combination method you picked, and it's normalized to the mean flux. The trace table holds polynomials that define the location of the slices on the CCD. She's thorough.

Processing does all of this, in order:

  • trims the raw data and records the overscan statistics
  • subtracts the bias (and it takes the overscan into account, unless --overscan is "none")
  • optionally subtracts the dark from each raw input image
  • converts them from adu to count
  • scales them according to their exposure time
  • combines the exposures using the input parameters

Then, to trace the position of the slices on the CCD, their edges are located using a threshold method. The edge detection is repeated at given intervals, which is how it traces the central position (that's the mean of both edges, btw) and the width of each slit vertically across the CCD. Deviant positions of detections on CCD rows can be detected and excluded before a polynomial gets fitted to all positions measured for one slice. The polynomial parameters for each slice are saved in the output trace table. And finally, the area between the now-known slice edges is searched for dark (and bright) pixels, using statistics in each row of the master flat.


πŸ’… OPTIONS πŸ’…

Every single one, no skips, we are thorough here 🫢

  • --nifu <int> β€” IFU to handle. If it's set to 0, all IFUs are processed serially. If it's set to -1, all IFUs are processed in parallel. (int; default: 0). The full name of this option for the EsoRex configuration file is muse.muse_flat.nifu [default = 0].
  • --overscan <str> β€” If this is "none", processing stops when discrepant overscan levels are detected (see ovscsigma). For "offset" it assumes that the mean overscan level represents the real offset in the bias levels of the exposures involved, and adjusts the data accordingly. For "vpoly", a polynomial is fit to the vertical overscan and subtracted from the whole quadrant. (str; default: Β΄vpolyΒ΄). The full name of this option for the EsoRex configuration file is muse.muse_flat.overscan [default = vpoly].
  • --ovscreject <str> β€” This influences how values are rejected when computing overscan statistics. Either no rejection at all ("none"), rejection using the DCR algorithm ("dcr"), or rejection using an iterative constant fit ("fit"). (str; default: Β΄dcrΒ΄). The full name of this option for the EsoRex configuration file is muse.muse_flat.ovscreject [default = dcr].
  • --ovscsigma <float> β€” If the deviation of mean overscan levels between a raw input image and the reference image is higher than |ovscsigma x stdev|, stop the processing. If overscan="vpoly", this is used as the sigma rejection level for the iterative polynomial fit (the level comparison is then done afterwards with |100 x stdev| to guard against incompatible settings). Has no effect for overscan="offset". (float; default: 30.0). The full name of this option for the EsoRex configuration file is muse.muse_flat.ovscsigma [default = 30.0].
  • --ovscignore <int> β€” The number of pixels of the overscan adjacent to the data section of the CCD that are ignored when computing statistics or fits. (int; default: 3). The full name of this option for the EsoRex configuration file is muse.muse_flat.ovscignore [default = 3].
  • --combine <str> β€” Type of combination to use (str; default: Β΄sigclipΒ΄). The full name of this option for the EsoRex configuration file is muse.muse_flat.combine [default = sigclip].
  • --nlow <int> β€” Number of minimum pixels to reject with minmax (int; default: 1). The full name of this option for the EsoRex configuration file is muse.muse_flat.nlow [default = 1].
  • --nhigh <int> β€” Number of maximum pixels to reject with minmax (int; default: 1). The full name of this option for the EsoRex configuration file is muse.muse_flat.nhigh [default = 1].
  • --nkeep <int> β€” Number of pixels to keep with minmax (int; default: 1). The full name of this option for the EsoRex configuration file is muse.muse_flat.nkeep [default = 1].
  • --lsigma <float> β€” Low sigma for pixel rejection with sigclip (float; default: 3.0). The full name of this option for the EsoRex configuration file is muse.muse_flat.lsigma [default = 3.0].
  • --hsigma <float> β€” High sigma for pixel rejection with sigclip (float; default: 3.0). The full name of this option for the EsoRex configuration file is muse.muse_flat.hsigma [default = 3.0].
  • --scale <bool> β€” Scale the individual images to a common exposure time before combining them. (bool; default: True). The full name of this option for the EsoRex configuration file is muse.muse_flat.scale [default = True].
  • --normalize <bool> β€” Normalize the master flat to the average flux (bool; default: True). The full name of this option for the EsoRex configuration file is muse.muse_flat.normalize [default = True].
  • --trace <bool> β€” Trace the position of the slices on the master flat (bool; default: True). The full name of this option for the EsoRex configuration file is muse.muse_flat.trace [default = True].
  • --nsum <int> β€” Number of lines over which to average when tracing (int; default: 32). The full name of this option for the EsoRex configuration file is muse.muse_flat.nsum [default = 32].
  • --order <int> β€” Order of polynomial fit to the trace (int; default: 5). The full name of this option for the EsoRex configuration file is muse.muse_flat.order [default = 5].
  • --edgefrac <float> β€” Fractional change required to identify edge when tracing (float; default: 0.5). The full name of this option for the EsoRex configuration file is muse.muse_flat.edgefrac [default = 0.5].
  • --losigmabadpix <float> β€” Low sigma to find dark pixels in the master flat (float; default: 5.0). The full name of this option for the EsoRex configuration file is muse.muse_flat.losigmabadpix [default = 5.0].
  • --hisigmabadpix <float> β€” High sigma to find bright pixels in the master flat (float; default: 5.0). The full name of this option for the EsoRex configuration file is muse.muse_flat.hisigmabadpix [default = 5.0].
  • --samples <bool> β€” Create a table containing all tracing sample points. (bool; default: False). The full name of this option for the EsoRex configuration file is muse.muse_flat.samples [default = False].
  • --merge <bool> β€” Merge output products from different IFUs into a common file. (bool; default: False). The full name of this option for the EsoRex configuration file is muse.muse_flat.merge [default = False].
heads up bestie: it is possible to create a configuration file containing these options, along with suitable default values. Please refer to the details provided by the 'esorex --help' command. πŸ‘‘

πŸ”₯ SEE ALSO πŸ”₯

The full documentation for the muse pipeline can be downloaded as a PDF file using the following URL:

ftp://ftp.eso.org/pub/dfs/pipelines/muse/muse-pipeline-cookbook-2.8.7.pdf

An overview over the existing ESO pipelines can be found on the web page https://www.eso.org/sci/software/pipelines/.

Basic documentation about the EsoRex program can be found at the esorex (1) man page.

It is possible to call the pipelines from python using the python-cpl package. See https://packages.python.org/python-cpl/index.html for further information.

The other recipes of the muse pipeline are muse_ampl(7), muse_astrometry(7), muse_bias(7), muse_create_sky(7), muse_dark(7), muse_exp_align(7), muse_exp_combine(7), muse_geometry(7), muse_illum(7), muse_lingain(7), muse_lsf(7), muse_qi_mask(7), muse_scibasic(7), muse_scipost(7), muse_scipost_apply_astrometry(7), muse_scipost_calibrate_flux(7), muse_scipost_combine_pixtables(7), muse_scipost_correct_dar(7), muse_scipost_correct_rv(7), muse_scipost_make_cube(7), muse_scipost_raman(7), muse_scipost_subtract_sky(7), muse_scipost_subtract_sky_simple(7), muse_standard(7), muse_twilight(7), muse_wavecal(7)


⭐ VERSION ⭐

muse_flat 2.8.7


🌈 AUTHOR 🌈

Peter Weilbacher (based on Joris Gerssen's draft) <https://support.eso.org>


πŸ™ˆ BUG REPORTS πŸ™ˆ

Please report any problems to https://support.eso.org. Alternatively, you may send a report to the ESO User Support Department <usd-help@eso.org>.


πŸ‘‘ LICENSE πŸ‘‘

This file is part of the MUSE Instrument Pipeline Copyright (C) 2005, 2019 European Southern Observatory

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA


and that's the whole thing, bestie πŸ’– This page is muse_flat version 2.8.7, and yeah β€” the man page itself is dated 2.8.7 too, so everything lines up, no cap. Go trace those slices, you're gonna eat. slay βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from