This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sync my Atom settings across devices. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import numpy as np | |
from astropy.io import fits | |
files = ['HE0433_mom0.fits', 'HE0433_mom1.fits', 'HE0433_mom2.fits'] | |
outnames = ['mom0_masked.fits', 'mom1_masked.fits', 'mom2_masked.fits'] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
flip_osiris_axes.py: Convert a Keck/OSIRIS IFU datacube from axes of | |
(Lambda, RA, Dec) to (RA, Dec, Lambda) so that it can be read by, e.g., | |
QFitsView. | |
OSIRIS, for a frankly mystifying reason, (related to FITS FORTRAN axes | |
orders, I think), defaults to axes of (Lambda, RA, Dec.). This script | |
converts the cube to (Ra, Dec, Lambda), which requires both a reorder of the |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fusemusealma(muse_moment_fits, alma_moment_fits): | |
''' | |
Open MUSE and ALMA HDUs, pick up their WCSs, | |
drop needless ALMA WCS axes, reproject | |
ALMA to MUSE, then output new HDUs. | |
''' | |
museHDU = fits.open(get_pkg_data_filename(muse_moment_fits)) | |
almaHDU = fits.open(get_pkg_data_filename(alma_moment_fits)) | |
w_alma = WCS(almaHDU[0]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import glob | |
import warnings | |
from astropy.io import fits | |
from astropy.wcs import WCS | |
from astroquery.ned import Ned |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import glob | |
import argparse | |
import warnings | |
from astropy.io import fits | |
from astropy.wcs import WCS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Yes, this is the dumb way you have to select mpl.style (like 'ggplot') colors: | |
color_number = 2 | |
color_choice = list(plt.rcParams['axes.prop_cycle'])[color_number]['color'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fusemusealma(muse_moment_fits, alma_moment_fits): | |
''' | |
Open MUSE and ALMA HDUs, pick up their WCSs, | |
drop needless ALMA WCS axes, reproject | |
ALMA to MUSE, then output new HDUs. | |
''' | |
museHDU = fits.open(get_pkg_data_filename(muse_moment_fits)) | |
almaHDU = fits.open(get_pkg_data_filename(alma_moment_fits)) |
OlderNewer