Skip to content

Commit

Permalink
doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
kbwestfall committed Jul 31, 2023
1 parent 64e29ac commit fa124de
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 36 deletions.
2 changes: 1 addition & 1 deletion doc/help/pypeit_coadd_1dspec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
file for the echelle setup in question
setup_id: string identifier for the echelle setup in
question, i.e. 'VIS', 'NIR', or '
question, i.e. 'VIS', 'NIR', or 'UVB'
If the coaddfile is not given the output file will be
placed in the same directory as the first spec1d file.
Expand Down
2 changes: 1 addition & 1 deletion pypeit/core/wavecal/wvutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def get_sampling(waves, pix_per_R=3.0):
Computes the median wavelength sampling of wavelength vector(s)
Args:
waves (list or `numpy.ndarray`_):
waves (list, `numpy.ndarray`_):
List of `numpy.ndarray`_ wavelength arrays or a single 1d
'numpy.ndarray'_
pix_per_R (float):
Expand Down
3 changes: 3 additions & 0 deletions pypeit/scripts/flux_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
from pypeit.spectrographs.util import load_spectrograph

def match_spec1ds_to_sensfuncs(spectrograph_name, spec1dfiles, sensfiles):
"""
This needs a docstring
"""
result_map = {}
spectrograph = load_spectrograph(spectrograph_name)

Expand Down
16 changes: 9 additions & 7 deletions pypeit/sensfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ class SensFunc(datamodel.DataContainer):
par (:class:`~pypeit.par.pypeitpar.SensFuncPar`):
The parameters required for the sensitivity function computation.
par_fluxcalib (:class:`~pypeit.par.pypeitpar.FluxCalibPar`, optional):
The parameters required for flux calibration. These are only used for
flux calibration of the standard star spectrum for the QA plot. If None, defaults will be used.
The parameters required for flux calibration. These are only used
for flux calibration of the standard star spectrum for the QA plot.
If None, defaults will be used.
debug (:obj:`bool`, optional):
Run in debug mode, sending diagnostic information to the screen.
"""
Expand Down Expand Up @@ -145,7 +146,10 @@ def empty_sensfunc_table(norders, nspec, nspec_in, ncoeff=1):
nspec (:obj:`int`):
The number of spectral pixels for the zeropoint arrays.
nspec_in (:obj:`int`):
The number of spectral pixels on the detector for the input standard star spectrum.
The number of spectral pixels on the detector for the input
standard star spectrum.
ncoeff (:obj:`int`, optional):
Number of coefficients for smooth model fit to zeropoints
Returns:
`astropy.table.Table`_: Instance of the empty sensitivity
Expand Down Expand Up @@ -285,11 +289,9 @@ def compute_blaze(self, wave, trace_spec, trace_spat, flatfile, box_radius=10.0,
debug (:obj:`bool`, optional):
Show plots useful for debugging. Default=False
Returns:
log10_blaze_function (`numpy.ndarray`_):
The log10 blaze function. Shape = (nspec, norddet) if norddet > 1, else shape = (nspec,)
`numpy.ndarray`_: The log10 blaze function. Shape = (nspec, norddet)
if norddet > 1, else shape = (nspec,)
"""


Expand Down
2 changes: 1 addition & 1 deletion pypeit/specobjs.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ def apply_flux_calib(self, par, spectrograph, sens):
sensitivity function (``sens``).
Args:
par (pypeit.par.pypeitpar.FluxCalibrate):
par (:class:`~pypeit.par.pypeitpar.FluxCalibratePar`):
Parset object containing parameters governing the flux calibration.
spectrograph (:class:`~pypeit.spectrographs.spectrograph.Spectrograph`):
PypeIt Spectrograph class
Expand Down
28 changes: 2 additions & 26 deletions pypeit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1112,14 +1112,6 @@ def robust_meanstd(array):
def polyfitter2d(data, mask=None, order=2):
"""
2D fitter
Args:
data:
mask:
order:
Returns:
"""
x, y = np.meshgrid(np.linspace(0.0, 1.0, data.shape[1]), np.linspace(0.0, 1.0, data.shape[0]))
if isinstance(mask, (float, int)):
Expand Down Expand Up @@ -1154,15 +1146,6 @@ def polyfitter2d(data, mask=None, order=2):
def polyfit2d(x, y, z, order=3):
"""
Generate 2D polynomial
Args:
x:
y:
z:
order:
Returns:
"""
ncols = (order + 1)**2
G = np.zeros((x.size, ncols))
Expand All @@ -1176,14 +1159,6 @@ def polyfit2d(x, y, z, order=3):
def polyval2d(x, y, m):
"""
Generate 2D polynomial
Args:
x:
y:
m:
Returns:
"""
order = int(np.sqrt(len(m))) - 1
ij = itertools.product(range(order+1), range(order+1))
Expand All @@ -1199,6 +1174,7 @@ def subsample(frame):
Args:
frame (`numpy.ndarray`_):
Array of data to subsample.
Returns:
`numpy.ndarray`_: Sliced image
Expand Down Expand Up @@ -1262,7 +1238,7 @@ def yamlify(obj, debug=False):
Returns
-------
obj: :class:`object`
obj : :class:`object`
An object suitable for yaml serialization. For example
`numpy.ndarray`_ is converted to :class:`list`,
:class:`numpy.int64` is converted to :class:`int`, etc.
Expand Down

0 comments on commit fa124de

Please sign in to comment.