Skip to content

Commit

Permalink
Added OH 1667 line
Browse files Browse the repository at this point in the history
  • Loading branch information
kmhess committed Jun 7, 2024
1 parent 5eecc10 commit af4028d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ OPTIONAL:
-m Make a combined image using ImageMagick. If a path is provided after this option, it is assumed to be the path to the `convert` executable of ImageMagick.
-ui User supplied image for overlaying HI contours. Can use this in combination with `-s` and a list of surveys.
-ur Percentile range when plotting the user supplied image. Requires two values. Default is [10., 99.].
-l Specify a spectral line for all sources in catalog. Default is 'HI'. Also possible is 'CO' which refers to CO(1-0).
-l Specify a spectral line for all sources in catalog. Default is 'HI'. Also possible is 'CO' and 'OH'.
```

### Examples
Expand Down Expand Up @@ -126,7 +126,7 @@ Advanced tips

* If you have a large catalog of sources, start by testing SIP with the `-id N` option, where `N` is a source id number. Make sure the image and text outputs from SIP for that source are as you expect. Adjust optional variables as necessary. Run on your larger catalog.

* SIP is now capable of doing spectral lines other than HI. So far `HI` and `CO` are the only allowed options, and CO refers only to CO(1-0). This is work in progress.
* SIP is now capable of doing spectral lines other than HI. So far `HI`, `CO`, and `OH` are the only allowed options. CO refers only to CO(1-0) and OH refers only to the 1667 MHz line. This is work in progress.

* Available surveys from `astroquery` can be found by running:
```
Expand Down
2 changes: 1 addition & 1 deletion src/image_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def main():

parser.add_argument('-line', '--spectral-line', default=None,
help='Optional: Provide name of spectral line such as "CO" for "CO(1-0)". Default is "HI".\n'
'Work in progress.')
' See github for more details on available lines. Work in progress.')

###################################################################

Expand Down
12 changes: 7 additions & 5 deletions src/modules/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,23 +415,25 @@ def create_pv(source, filename, opt_view=6*u.arcmin, min_axis=False):
def line_lookup(spec_line):
"""Return rest frequency and object to convert to optical velocities for requested line.
:param line:
:type line:
:param spec_line:
:type spec_line:
:return:
:rtype:
"""

rad_opt = 'Optical'
if (spec_line == None) or (spec_line == 'HI'):
spec_line == 'HI'
restfreq_line = 1420405751.77 * u.Hz
convention = u.doppler_optical(restfreq_line)
rad_opt = 'Optical'
elif spec_line == 'CO':
restfreq_line = 115.27120180 * u.GHz
convention = u.doppler_optical(restfreq_line)
rad_opt = 'Optical'
elif spec_line == 'OH':
restfreq_line = 1.6673590 * u.GHz
convention = u.doppler_optical(restfreq_line)
else:
print("ERROR: Unrecognized spectral line. Try 'HI' or 'CO'.")
print("ERROR: Unrecognized spectral line. Try 'HI', 'CO', or 'OH'.")
exit()

return {'name': spec_line, 'restfreq': restfreq_line, 'convention':convention, 'rad_opt':rad_opt}
Expand Down

0 comments on commit af4028d

Please sign in to comment.