diff --git a/doc/api/pypeit.scripts.chk_flexure.rst b/doc/api/pypeit.scripts.chk_flexure.rst new file mode 100644 index 0000000000..90d71dfdb8 --- /dev/null +++ b/doc/api/pypeit.scripts.chk_flexure.rst @@ -0,0 +1,8 @@ +pypeit.scripts.chk\_flexure module +================================== + +.. automodule:: pypeit.scripts.chk_flexure + :members: + :private-members: + :undoc-members: + :show-inheritance: diff --git a/doc/api/pypeit.scripts.rst b/doc/api/pypeit.scripts.rst index 9709614544..f634be1145 100644 --- a/doc/api/pypeit.scripts.rst +++ b/doc/api/pypeit.scripts.rst @@ -12,6 +12,7 @@ Submodules pypeit.scripts.chk_alignments pypeit.scripts.chk_edges pypeit.scripts.chk_flats + pypeit.scripts.chk_flexure pypeit.scripts.chk_for_calibs pypeit.scripts.chk_noise_1dspec pypeit.scripts.chk_noise_2dspec diff --git a/doc/help/pypeit_chk_flexure.rst b/doc/help/pypeit_chk_flexure.rst new file mode 100644 index 0000000000..d7110d32d4 --- /dev/null +++ b/doc/help/pypeit_chk_flexure.rst @@ -0,0 +1,18 @@ +.. code-block:: console + + $ pypeit_chk_flexure -h + usage: pypeit_chk_flexure [-h] (--spec | --spat) [--try_old] + input_file [input_file ...] + + Print QA on flexure to the screen + + positional arguments: + input_file One or more PypeIt spec2d or spec1d file + + options: + -h, --help show this help message and exit + --spec Check the spectral flexure (default: False) + --spat Check the spatial flexure (default: False) + --try_old Attempt to load old datamodel versions. A crash may ensue.. + (default: False) + \ No newline at end of file diff --git a/doc/help/pypeit_sensfunc.rst b/doc/help/pypeit_sensfunc.rst index 8eb7d65e05..701944f327 100644 --- a/doc/help/pypeit_sensfunc.rst +++ b/doc/help/pypeit_sensfunc.rst @@ -1,9 +1,9 @@ .. code-block:: console $ pypeit_sensfunc -h - usage: pypeit_sensfunc [-h] [--algorithm {UVIS,IR}] [--multi MULTI] [-o OUTFILE] - [-s SENS_FILE] [-f FLATFILE] [--debug] - [--par_outfile PAR_OUTFILE] [-v VERBOSITY] + usage: pypeit_sensfunc [-h] [--extr {OPT,BOX}] [--algorithm {UVIS,IR}] + [--multi MULTI] [-o OUTFILE] [-s SENS_FILE] [-f FLATFILE] + [--debug] [--par_outfile PAR_OUTFILE] [-v VERBOSITY] spec1dfile Compute a sensitivity function @@ -14,6 +14,16 @@ options: -h, --help show this help message and exit + --extr {OPT,BOX} Override the default extraction method used for + computing the sensitivity function. Note that it is not + possible to set --extr and simultaneously use a .sens + file with the --sens_file option. If you are using a + .sens file, set the algorithm there via: + + [sensfunc] + extr = BOX + + The extraction options are: OPT or BOX --algorithm {UVIS,IR} Override the default algorithm for computing the sensitivity function. Note that it is not possible to diff --git a/doc/help/run_pypeit.rst b/doc/help/run_pypeit.rst index 2870d8a61a..a0d772877b 100644 --- a/doc/help/run_pypeit.rst +++ b/doc/help/run_pypeit.rst @@ -4,7 +4,7 @@ usage: run_pypeit [-h] [-v VERBOSITY] [-r REDUX_PATH] [-m] [-s] [-o] [-c] pypeit_file - ## PypeIt : The Python Spectroscopic Data Reduction Pipeline v1.16.1.dev109+g885cb1823 + ## PypeIt : The Python Spectroscopic Data Reduction Pipeline v1.16.1.dev336+gdf3013372.d20240827 ## ## Available spectrographs include: ## bok_bc, gemini_flamingos1, gemini_flamingos2, gemini_gmos_north_e2v, diff --git a/doc/include/class_datamodel_sensfunc.rst b/doc/include/class_datamodel_sensfunc.rst index fbf98d1922..e57591681c 100644 --- a/doc/include/class_datamodel_sensfunc.rst +++ b/doc/include/class_datamodel_sensfunc.rst @@ -8,6 +8,7 @@ Attribute Type Array Type Description ``airmass`` float Airmass of the observation ``algorithm`` str Algorithm used for the sensitivity calculation. ``exptime`` float Exposure time +``extr`` str Extraction method used for the standard star (OPT or BOX) ``pypeline`` str PypeIt pipeline reduction path ``sens`` `astropy.table.table.Table`_ Table with the sensitivity function ``spec1df`` str PypeIt spec1D file used to for sensitivity function diff --git a/doc/include/dependencies_table.rst b/doc/include/dependencies_table.rst index eedeadd17a..bfa5485e86 100644 --- a/doc/include/dependencies_table.rst +++ b/doc/include/dependencies_table.rst @@ -1,5 +1,5 @@ -======================= ========================================================================================================================================================================================================================================================================================================================================================= -Python Version ``>=3.10,<3.13`` -Required for users ``IPython>=7.10.0``, ``PyERFA>=2.0.0``, ``PyYAML>=5.1``, ``astropy>=6.0``, ``bottleneck``, ``configobj>=5.0.6``, ``extension-helpers>=0.1``, ``fast-histogram>=0.11``, ``ginga>=5.1.0``, ``linetools>=0.3.1``, ``matplotlib>=3.7``, ``numpy>=1.23``, ``packaging>=0.19``, ``pygithub``, ``pyqt6``, ``qtpy>=2.0.1``, ``scikit-learn>=1.0``, ``scipy>=1.7`` -Required for developers ``coverage``, ``docutils<0.21``, ``psutil``, ``pygit2``, ``pytest-astropy``, ``pytest-cov``, ``pytest-qt``, ``pytest>=6.0.0``, ``scikit-image``, ``specutils>=1.13``, ``sphinx-automodapi``, ``sphinx>=1.6,<8``, ``sphinx_rtd_theme==2.0.0``, ``tox`` -======================= ========================================================================================================================================================================================================================================================================================================================================================= +======================= ======================================================================================================================================================================================================================================================================================================================================================================= +Python Version ``>=3.10,<3.13`` +Required for users ``IPython>=7.10.0``, ``PyERFA>=2.0.0``, ``PyYAML>=5.1``, ``astropy>=6.0``, ``bottleneck``, ``configobj>=5.0.6``, ``extension-helpers>=0.1``, ``fast-histogram>=0.11``, ``ginga>=5.1.0``, ``linetools>=0.3.1``, ``matplotlib>=3.7``, ``numpy>=1.23,<2.0.0``, ``packaging>=0.19``, ``pygithub``, ``pyqt6<=6.7.0``, ``qtpy>=2.0.1``, ``scikit-learn>=1.0``, ``scipy>=1.7`` +Required for developers ``coverage``, ``docutils<0.21``, ``psutil``, ``pygit2``, ``pytest-astropy``, ``pytest-cov``, ``pytest-qt``, ``pytest>=6.0.0``, ``scikit-image``, ``specutils>=1.13``, ``sphinx-automodapi``, ``sphinx>=1.6,<8``, ``sphinx_rtd_theme==2.0.0``, ``tox`` +======================= ======================================================================================================================================================================================================================================================================================================================================================================= diff --git a/doc/include/inst_detector_table.rst b/doc/include/inst_detector_table.rst index cbb0df365a..3aa03054fc 100644 --- a/doc/include/inst_detector_table.rst +++ b/doc/include/inst_detector_table.rst @@ -85,9 +85,9 @@ Instrument Det specaxis specflip spatflip namp gain ``vlt_fors2`` 1 1 False False 1 0.7 2.9 2.1 -1.0e+10 200000.0 0.8000 0.1260 ... 2 1 False False 1 0.7 3.15 1.4 -1.0e+10 200000.0 0.8000 0.1260 ``vlt_sinfoni`` 1 0 True False 1 2.42 7.0 540.0 -1.0e+10 1000000000.0 1.0000 0.0125 -``vlt_xshooter_nir`` 1 1 False False 1 2.12 8.0 0.0 -1.0e+10 200000.0 0.8600 0.1970 -``vlt_xshooter_uvb`` 1 0 True True 1 1.61 2.6 0.0 -1.0e+10 65000.0 0.8600 0.1610 -``vlt_xshooter_vis`` 1 0 False False 1 0.595 3.1 0.0 -1.0e+10 65535.0 0.8600 0.1600 +``vlt_xshooter_nir`` 1 1 False False 1 2.29 8.0 72.0 -1.0e+10 200000.0 0.8600 0.2450 +``vlt_xshooter_uvb`` 1 0 True True 1 ``None`` ``None`` 0.0 -1.0e+10 65000.0 0.8600 0.1640 +``vlt_xshooter_vis`` 1 0 False False 1 ``None`` ``None`` 0.0 -1.0e+10 65535.0 0.8600 0.1540 ``wht_isis_blue`` 1 0 False False 1 1.2 5.0 0.0 -1.0e+10 65535.0 0.7600 0.2000 ``wht_isis_red`` 1 0 False False 1 0.98 4.0 0.0 -1.0e+10 65535.0 0.7600 0.2200 ============================ === ======== ======== ======== ======== ========================== ====================== ======== ======== ============ ========= ========== diff --git a/doc/pypeit_par.rst b/doc/pypeit_par.rst index ebbc746b52..8714068891 100644 --- a/doc/pypeit_par.rst +++ b/doc/pypeit_par.rst @@ -349,7 +349,7 @@ Class Instantiation: :class:`~pypeit.par.pypeitpar.EdgeTracePar` =========================== ================ =========================================== ============== =================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== Key Type Options Default Description =========================== ================ =========================================== ============== =================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== -``add_missed_orders`` bool .. False For any Echelle spectrograph (fixed-format or otherwise), attempt to add orders that have been missed by the automated edge tracing algorithm. For *fixed-format* Echelles, this is based on the expected positions on on the detector. Otherwise, the detected orders are modeled and roughly used to predict the locations of missed orders; see additional parameters ``order_width_poly``, ``order_gap_poly``, and ``order_spat_range``. +``add_missed_orders`` bool .. False For any Echelle spectrograph (fixed-format or otherwise), attempt to add orders that have been missed by the automated edge tracing algorithm. For *fixed-format* echelles, this is based on the expected positions on on the detector. Otherwise, the detected orders are modeled and used to predict the locations of missed orders; see additional parameters ``order_width_poly``, ``order_gap_poly``, ``order_fitrej``, ``order_outlier``, and ``order_spat_range``. ``add_predict`` str .. ``nearest`` Sets the method used to predict the shape of the left and right traces for a user-defined slit inserted. Options are (1) ``straight`` inserts traces with a constant spatial pixels position, (2) ``nearest`` inserts traces with a form identical to the automatically identified trace at the nearest spatial position to the inserted slit, or (3) ``pca`` uses the PCA decomposition to predict the shape of the traces. ``add_slits`` str, list .. .. Add one or more user-defined slits. The syntax to define a slit to add is: 'det:spec:spat_left:spat_right' where det=detector, spec=spectral pixel, spat_left=spatial pixel of left slit boundary, and spat_righ=spatial pixel of right slit boundary. For example, '2:2000:2121:2322,3:2000:1201:1500' will add a slit to detector 2 passing through spec=2000 extending spatially from 2121 to 2322 and another on detector 3 at spec=2000 extending from 1201 to 1500. ``auto_pca`` bool .. True During automated tracing, attempt to construct a PCA decomposition of the traces. When True, the edge traces resulting from the initial detection, centroid refinement, and polynomial fitting must meet a set of criteria for performing the pca; see :func:`pypeit.edgetrace.EdgeTraceSet.can_pca`. If False, the ``sync_predict`` parameter *cannot* be set to ``pca``; if it is not, the value is set to ``nearest`` and a warning is issued when validating the parameter set. @@ -390,9 +390,11 @@ Key Type Options ``minimum_slit_length_sci`` int, float .. .. Minimum slit length in arcsec for a science slit. Slit lengths are determined by the median difference between the left and right edge locations for the unmasked trace locations. Used in combination with ``minimum_slit_length``, this parameter is used to identify box or alignment slits; i.e., those slits that are shorter than ``minimum_slit_length_sci`` but larger than ``minimum_slit_length`` are box/alignment slits. Box slits are *never* removed (see ``clip``), but no spectra are extracted from them. If None, no minimum science slit length is applied. ``niter_gaussian`` int .. 6 The number of iterations of :func:`~pypeit.core.trace.fit_trace` to use when using Gaussian weighting. ``niter_uniform`` int .. 9 The number of iterations of :func:`~pypeit.core.trace.fit_trace` to use when using uniform weighting. +``order_fitrej`` int, float .. 3.0 When fitting the width of and gap beteween echelle orders with Legendre polynomials, this is the sigma-clipping threshold when excluding data from the fit. See ``add_missed_orders``. ``order_gap_poly`` int .. 3 Order of the Legendre polynomial used to model the spatial gap between orders as a function of the order spatial position. See ``add_missed_orders``. ``order_match`` int, float .. .. Orders for *fixed-format* echelle spectrographs are always matched to a predefined expectation for the number of orders found and their relative placement in the detector. This sets the tolerance allowed for matching identified "slits" to echelle orders. Must be relative to the fraction of the detector spatial scale (i.e., a value of 0.05 means that the order locations must be within 5% of the expected value). If None, no limit is used. ``order_offset`` int, float .. .. Orders for *fixed-format* echelle spectrographs are always matched to a predefined expectation for the number of orders found and their relative placement in the detector. This sets the offset to introduce to the expected order positions to improve the match for this specific data. This is an additive offset to the measured slit positions; i.e., this should minimize the difference between the expected order positions and ``self.slit_spatial_center() + offset``. Must be in the fraction of the detector spatial scale. If None, no offset is applied. +``order_outlier`` int, float .. .. When fitting the width of echelle orders with Legendre polynomials, this is the sigma-clipping threshold used to identify outliers. Orders clipped by this threshold are *removed* from further consideration, whereas orders clipped by ``order_fitrej`` are excluded from the polynomial fit but are not removed. Note this is *only applied to the order widths*, not the order gaps. If None, no "outliers" are identified/removed. Should be larger or equal to ``order_fitrej``. ``order_spat_range`` list .. .. The spatial range of the detector/mosaic over which to predict order locations. If None, the full detector/mosaic range is used. See ``add_missed_orders``. ``order_width_poly`` int .. 2 Order of the Legendre polynomial used to model the spatial width of each order as a function of spatial pixel position. See ``add_missed_orders``. ``overlap`` bool .. False Assume slits identified as abnormally short are actually due to overlaps between adjacent slits/orders. If set to True, you *must* have also used ``length_range`` to identify left-right edge pairs that have an abnormally short separation. For those short slits, the code attempts to convert the short slits into slit gaps. This is particularly useful for blue orders in Keck-HIRES data. @@ -782,8 +784,9 @@ Key Type Options Default Description ``skip_second_find`` bool .. False Only perform one round of object finding (mainly for quick_look) ``skip_skysub`` bool .. False If True, do not sky subtract when performing object finding. This should be set to True for example when running on data that is already sky-subtracted. Note that for near-IR difference imaging one still wants to remove sky-residuals via sky-subtraction, and so this is typically set to False ``snr_thresh`` int, float .. 10.0 S/N threshold for object finding in wavelength direction smashed image. -``std_spec1d`` str .. .. A PypeIt spec1d file of a previously reduced standard star. The trace of the standard star spectrum is used as a crutch for tracing the object spectra, when a direct trace is not possible (i.e., faint sources). If provided, this overrides use of any standards included in your pypeit file; the standard exposures will still be reduced. +``std_spec1d`` str .. .. A PypeIt spec1d file of a previously reduced standard star. This can be used to trace the object spectra, but the ``use_std_trace`` parameter must be set to True. If provided, this overrides use of any standards included in your pypeit file; the standard exposures will still be reduced. ``trace_npoly`` int .. 5 Order of legendre polynomial fits to object traces. +``use_std_trace`` bool .. True If True, the trace of the standard star spectrum is used as a crutch for tracing the object spectra. This is useful when a direct trace is not possible (i.e., faint sources). Note that a standard star exposure must be included in your pypeit file, or the ``std_spec1d`` parameter must be set for this to work. =========================== ========== ======= ======= ============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================= @@ -940,6 +943,7 @@ Key Type Options ``IR`` :class:`~pypeit.par.pypeitpar.TelluricPar` .. `TelluricPar Keywords`_ Parameters for the IR sensfunc algorithm ``UVIS`` :class:`~pypeit.par.pypeitpar.SensfuncUVISPar` .. `SensfuncUVISPar Keywords`_ Parameters for the UVIS sensfunc algorithm ``algorithm`` str ``UVIS``, ``IR`` ``UVIS`` Specify the algorithm for computing the sensitivity function. The options are: (1) UVIS = Should be used for data with :math:`\lambda < 7000` A. No detailed model of telluric absorption but corrects for atmospheric extinction. (2) IR = Should be used for data with :math:`\lambda > 7000` A. Peforms joint fit for sensitivity function and telluric absorption using HITRAN models. +``extr`` str .. ``OPT`` Extraction method to use for the sensitivity function. Options are: 'OPT' (optimal extraction), 'BOX' (boxcar extraction). Default is 'OPT'. ``extrap_blu`` float .. 0.1 Fraction of minimum wavelength coverage to grow the wavelength coverage of the sensitivitity function in the blue direction (`i.e.`, if the standard star spectrum cuts off at ``wave_min``) the sensfunc will be extrapolated to cover down to (1.0 - ``extrap_blu``) * ``wave_min`` ``extrap_red`` float .. 0.1 Fraction of maximum wavelength coverage to grow the wavelength coverage of the sensitivitity function in the red direction (`i.e.`, if the standard star spectrumcuts off at ``wave_max``) the sensfunc will be extrapolated to cover up to (1.0 + ``extrap_red``) * ``wave_max`` ``flatfile`` str .. .. Flat field file to be used if the sensitivity function model will utilize the blaze function computed from a flat field file in the Calibrations directory, e.g.Calibrations/Flat_A_0_DET01.fits @@ -2922,6 +2926,7 @@ Alterations to the default parameters are: dlength_range = 0.25 length_range = 0.3 add_missed_orders = True + order_outlier = 10.0 overlap = True [[tilts]] tracethresh = 15 @@ -2936,6 +2941,8 @@ Alterations to the default parameters are: [reduce] [[findobj]] find_trim_edge = 3, 3, + maxnumber_sci = 2 + maxnumber_std = 1 [[skysub]] global_sky_std = False [[extraction]] @@ -3973,6 +3980,8 @@ Alterations to the default parameters are: noise_floor = 0.01 use_illumflat = False [reduce] + [[findobj]] + maxnumber_std = 1 [[skysub]] bspline_spacing = 0.8 [[extraction]] @@ -7932,6 +7941,7 @@ Alterations to the default parameters are: ech_sigrej = 3.0 lamps = OH_XSHOOTER, sigdetect = 10.0 + fwhm_fromlines = False reid_arxiv = vlt_xshooter_nir.fits cc_thresh = 0.5 cc_local_thresh = 0.5 @@ -7960,7 +7970,7 @@ Alterations to the default parameters are: use_illumflat = False [reduce] [[findobj]] - trace_npoly = 8 + trace_npoly = 10 maxnumber_sci = 2 maxnumber_std = 1 [[skysub]] diff --git a/doc/releases/1.16.1dev.rst b/doc/releases/1.16.1dev.rst index 51b7b17d9c..b13afd3f4b 100644 --- a/doc/releases/1.16.1dev.rst +++ b/doc/releases/1.16.1dev.rst @@ -37,14 +37,20 @@ Instrument-specific Updates - Updated X-Shooter detector gain and read noise to come from header, and updated plate scales to the most recent values from the manual. Detailed changes are: + - NIR arm: + - Platescale updated from 0.197 to 0.245 arcsec/pixel - Dark current updated from 0. to 72. e-/pixel/hr - Gain updated from 2.12 to 2.29 e-/DN + - VIS arm: + - Platescale updated from an order-dependent value, to being 0.154 arcsec/pixel for all orders + - UVB arm: + - Platescale updated from an order-dependent value, to being 0.164 arcsec/pixel for all orders @@ -85,6 +91,8 @@ Under-the-hood Improvements - When detecting overlapping orders/slits, the code now forces each edge used to have been directly detected; i.e., if an edge is inserted, the fact that the resulting slit is abnormally short should not trigger the overlap detection. +- Improved the QA plot resulting from fitting order widths and gaps as a + function of spatial position. Bug Fixes --------- diff --git a/pypeit/core/flexure.py b/pypeit/core/flexure.py index a36e581ec4..7fda7bf2b4 100644 --- a/pypeit/core/flexure.py +++ b/pypeit/core/flexure.py @@ -1397,7 +1397,8 @@ def sky_em_residuals(wave:np.ndarray, flux:np.ndarray, def flexure_diagnostic(file, file_type='spec2d', flexure_type='spec', chk_version=False): """ - Print the spectral or spatial flexure of a spec2d or spec1d file + Print the spectral or spatial flexure of a spec2d or spec1d file. + Args: file (:obj:`str`, `Path`_): Filename of the spec2d or spec1d file to check @@ -1410,10 +1411,16 @@ def flexure_diagnostic(file, file_type='spec2d', flexure_type='spec', chk_versio If False, throw a warning only. Default is False. Returns: - :obj:`astropy.table.Table` or :obj:`float`: - - If file_type is 'spec2d' and flexure_type is 'spec', return a table with the spectral flexure - - If file_type is 'spec2d' and flexure_type is 'spat', return the spatial flexure - - If file_type is 'spec1d', return a table with the spectral flexure + :obj:`astropy.table.Table`, :obj:`float`: Type depends on the keyword + arguments: + + - If file_type is 'spec2d' and flexure_type is 'spec', return a + table with the spectral flexure + + - If file_type is 'spec2d' and flexure_type is 'spat', return the + spatial flexure + + - If file_type is 'spec1d', return a table with the spectral flexure """ diff --git a/pypeit/spectrographs/vlt_xshooter.py b/pypeit/spectrographs/vlt_xshooter.py index 98b5cf6895..9160f834e3 100644 --- a/pypeit/spectrographs/vlt_xshooter.py +++ b/pypeit/spectrographs/vlt_xshooter.py @@ -574,8 +574,8 @@ def get_detector_par(self, det, hdu=None): # Grab the gain and read noise from the header. # If hdu not present, use typical defaults - gain = None if hdu is None else hdu[0].header['HIERARCH ESO DET OUT1 CONAD'] - ronoise = None if hdu is None else hdu[0].header['HIERARCH ESO DET OUT1 RON'] + gain = None if hdu is None else np.atleast_1d(hdu[0].header['HIERARCH ESO DET OUT1 CONAD']) + ronoise = None if hdu is None else np.atleast_1d(hdu[0].header['HIERARCH ESO DET OUT1 RON']) # Detector 1 detector_dict = dict( @@ -591,8 +591,8 @@ def get_detector_par(self, det, hdu=None): nonlinear = 0.86, mincounts = -1e10, numamplifiers = 1, - gain = np.atleast_1d(gain), - ronoise = np.atleast_1d(ronoise), + gain = gain, + ronoise = ronoise, datasec=np.atleast_1d('[:,11:2058]'), # FITS format is flipped: PrimaryHDU (2106, 4000) w/respect to Python oscansec=np.atleast_1d('[:,2059:2106]'), # raw unbinned images are (4000,2106) (spec, spat) ) # pre and oscan are in the spatial direction @@ -866,8 +866,8 @@ def get_detector_par(self, det, hdu=None): binning = '1,1' if hdu is None else self.get_meta_value(self.get_headarr(hdu), 'binning') # Grab the gain and read noise from the header. - gain = None if hdu is None else hdu[0].header['HIERARCH ESO DET OUT1 CONAD'] - ronoise = None if hdu is None else hdu[0].header['HIERARCH ESO DET OUT1 RON'] + gain = None if hdu is None else np.atleast_1d(hdu[0].header['HIERARCH ESO DET OUT1 CONAD']) + ronoise = None if hdu is None else np.atleast_1d(hdu[0].header['HIERARCH ESO DET OUT1 RON']) # Detector 1 detector_dict = dict( @@ -883,8 +883,8 @@ def get_detector_par(self, det, hdu=None): nonlinear = 0.86, mincounts = -1e10, numamplifiers = 1, - gain = np.atleast_1d(gain), - ronoise = np.atleast_1d(ronoise), + gain = gain, + ronoise = ronoise, datasec = np.atleast_1d('[:,49:2096]'), # '[49:2000,1:2999]', oscansec = np.atleast_1d('[:,1:48]'), # '[1:48, 1:2999]', )