Skip to content

Commit

Permalink
Merge pull request #395 from Allonck/updateDocs
Browse files Browse the repository at this point in the history
Update docs and change variable name
  • Loading branch information
Allonck authored Mar 22, 2024
2 parents e32f63d + 64a6dab commit c7e7ce5
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 6 deletions.
7 changes: 6 additions & 1 deletion docs/_cosmic_ray_removal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,9 @@ methods.
Asymetric binnings have not been tested but the pipeline only takes in
consideration the dispersion axis to decide. This does not mean that the spatial
binning does not impact the performance of any of the methods, we just don't
know it yet.
know it yet.

.. note::

The prefix ``c`` is added to all the comparison lamps, despite they not being
affected by cosmic rays.
3 changes: 2 additions & 1 deletion docs/_observing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ Observing for Radial Velocity

Radial velocity measurements are possible with the |goodman HTS| but you have
to be careful. A very detailed description of the procedures and what you can
expect was prepared and is available `HERE <http://www.ctio.noao.edu/soar/sites/default/files/GOODMAN/goodman_rv.pdf>`_.
expect was prepared and is available `here <https://noirlab.edu/science/sites/default/files/media/archives/documents/scidoc0489.pdf>`_
and `here <https://noirlab.edu/science/sites/default/files/media/archives/documents/scidoc0490.pdf>`_ .

Please read it carefully so you don't find any surprises when trying to reduce
your data.
Expand Down
3 changes: 2 additions & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ This installation was tested on MacOS High Sierra.

2. Download Anaconda or Miniconda

``curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh --output miniconda.sh``
``curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh --output miniconda.sh``

If you have a different processor like intel, you can search miniconda installer url for your system.

Common Steps
************
Expand Down
6 changes: 3 additions & 3 deletions goodman_pipeline/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def call_cosmic_rejection(ccd,
log.info('Setting cosmic ray rejection method to:'
' {:s}'.format(method))

if ccd.header['OBSTYPE'] == 'COMP' and method != 'none':
if ccd.header['OBSTYPE'] in ['COMP', 'ARC'] and method != 'none':
log.info("Changing cosmic ray rejection method from '{:s}' to 'none'"
" for comparison lamp. Prefix 'c' will be added "
"anyway.".format(method))
Expand All @@ -317,11 +317,11 @@ def call_cosmic_rejection(ccd,
'the mask use --keep-cosmic-files')

if not os.path.isfile(os.path.join(red_path, 'dcr.par')):
_create = GenerateDcrParFile()
generate_dcr_parameters_file = GenerateDcrParFile()
_instrument = ccd.header['INSTCONF']
_binning, _ = ccd.header['CCDSUM'].split()

_create(instrument=_instrument, binning=_binning, path=red_path)
generate_dcr_parameters_file(instrument=_instrument, binning=_binning, path=red_path)

#out_prefix = prefix + out_prefix #Move line here

Expand Down
16 changes: 16 additions & 0 deletions goodman_pipeline/core/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,22 @@ def test_call_cosmic_rejection_comp_lamp(self):
ccd.header['GSP_FNAM'])
self.assertEqual('none', ccd.header['GSP_COSM'])

def test_call_cosmic_rejection_arc_lamp(self):
self.ccd.header.set('OBSTYPE', value='ARC')
prefix = 'new_'
ccd, out_prefix = call_cosmic_rejection(ccd=self.ccd,
image_name=self.file_name,
out_prefix=self.out_prefix,
red_path=self.red_path,
keep_files=True,
prefix=prefix,
method='dcr',
save=True)
self.assertEqual(prefix + self.out_prefix, out_prefix)
self.assertEqual(f"{prefix}{self.out_prefix}_{self.file_name}",
ccd.header['GSP_FNAM'])
self.assertEqual('none', ccd.header['GSP_COSM'])

def test_call_cosmic_rejection_not_implemented_error(self):
prefix = 'new_'
self.assertRaises(NotImplementedError,
Expand Down

0 comments on commit c7e7ce5

Please sign in to comment.