This file contains 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
# coding: utf-8 | |
# standard library | |
import multiprocessing as mp | |
# dependent packages | |
import numpy as np | |
# classes |
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 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
# coding: utf-8 | |
"""Mini tool to convert *.nqm to *.fits. | |
Usage: | |
$ python nqm_to_fits.py <nqmname> <fitsname> | |
""" | |
# standard library |
This file contains 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 numpy as np | |
import matplotlib.pyplot as plt | |
from numba import jit | |
from scipy.special import gammaln | |
from sklearn import decomposition | |
def lnpU(k): | |
q = (D-np.arange(k)) / 2 | |
ln2, lnpi = np.log(2), np.log(np.pi) | |
return np.sum(-ln2+gammaln(q)-lnpi*q) |
This file contains 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
from sys import _getframe | |
from inspect import stack | |
def default(func): | |
depth = [s[3] for s in stack()].index('<module>') | |
myglobals = sys._getframe(depth).f_globals | |
myglobals['__userfunc__'] = func | |
spec = getargspec(func) |
This file contains 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
"""Mini tool to modify nqm to one compatible with CASA's scantable. | |
Usage: | |
$ python nqm_for_scantable.py <nqmname> | |
Notes: | |
User can use wildcard '*' in <nqmname> for batch process. | |
""" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer