partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
valid
bls_parallel_pfind
Runs the Box Least Squares Fitting Search for transit-shaped signals. Breaks up the full frequency space into chunks and passes them to parallel BLS workers. Based on the version of BLS in Astropy 3.1: `astropy.stats.BoxLeastSquares`. If you don't have Astropy 3.1, this module will fail to import....
astrobase/periodbase/abls.py
def bls_parallel_pfind( times, mags, errs, magsarefluxes=False, startp=0.1, # by default, search from 0.1 d to... endp=100.0, # ... 100.0 d -- don't search full timebase stepsize=1.0e-4, mintransitduration=0.01, # minimum transit length in phase maxtransitdurat...
def bls_parallel_pfind( times, mags, errs, magsarefluxes=False, startp=0.1, # by default, search from 0.1 d to... endp=100.0, # ... 100.0 d -- don't search full timebase stepsize=1.0e-4, mintransitduration=0.01, # minimum transit length in phase maxtransitdurat...
[ "Runs", "the", "Box", "Least", "Squares", "Fitting", "Search", "for", "transit", "-", "shaped", "signals", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/periodbase/abls.py#L695-L1249
[ "def", "bls_parallel_pfind", "(", "times", ",", "mags", ",", "errs", ",", "magsarefluxes", "=", "False", ",", "startp", "=", "0.1", ",", "# by default, search from 0.1 d to...", "endp", "=", "100.0", ",", "# ... 100.0 d -- don't search full timebase", "stepsize", "=",...
2922a14619d183fb28005fa7d02027ac436f2265
valid
_parse_csv_header
This parses a CSV header from a K2 CSV LC. Returns a dict that can be used to update an existing lcdict with the relevant metadata info needed to form a full LC.
astrobase/hatsurveys/k2hat.py
def _parse_csv_header(header): '''This parses a CSV header from a K2 CSV LC. Returns a dict that can be used to update an existing lcdict with the relevant metadata info needed to form a full LC. ''' # first, break into lines headerlines = header.split('\n') headerlines = [x.lstrip('# ') ...
def _parse_csv_header(header): '''This parses a CSV header from a K2 CSV LC. Returns a dict that can be used to update an existing lcdict with the relevant metadata info needed to form a full LC. ''' # first, break into lines headerlines = header.split('\n') headerlines = [x.lstrip('# ') ...
[ "This", "parses", "a", "CSV", "header", "from", "a", "K2", "CSV", "LC", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/hatsurveys/k2hat.py#L404-L489
[ "def", "_parse_csv_header", "(", "header", ")", ":", "# first, break into lines", "headerlines", "=", "header", ".", "split", "(", "'\\n'", ")", "headerlines", "=", "[", "x", ".", "lstrip", "(", "'# '", ")", "for", "x", "in", "headerlines", "]", "# next, fin...
2922a14619d183fb28005fa7d02027ac436f2265
valid
read_csv_lightcurve
This reads in a K2 lightcurve in CSV format. Transparently reads gzipped files. Parameters ---------- lcfile : str The light curve file to read. Returns ------- dict Returns an lcdict.
astrobase/hatsurveys/k2hat.py
def read_csv_lightcurve(lcfile): ''' This reads in a K2 lightcurve in CSV format. Transparently reads gzipped files. Parameters ---------- lcfile : str The light curve file to read. Returns ------- dict Returns an lcdict. ''' # read in the file first ...
def read_csv_lightcurve(lcfile): ''' This reads in a K2 lightcurve in CSV format. Transparently reads gzipped files. Parameters ---------- lcfile : str The light curve file to read. Returns ------- dict Returns an lcdict. ''' # read in the file first ...
[ "This", "reads", "in", "a", "K2", "lightcurve", "in", "CSV", "format", ".", "Transparently", "reads", "gzipped", "files", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/hatsurveys/k2hat.py#L493-L545
[ "def", "read_csv_lightcurve", "(", "lcfile", ")", ":", "# read in the file first", "if", "'.gz'", "in", "os", ".", "path", ".", "basename", "(", "lcfile", ")", ":", "LOGINFO", "(", "'reading gzipped K2 LC: %s'", "%", "lcfile", ")", "infd", "=", "gzip", ".", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
get_starfeatures
This runs the functions from :py:func:`astrobase.varclass.starfeatures` on a single light curve file. Parameters ---------- lcfile : str This is the LC file to extract star features for. outdir : str This is the directory to write the output pickle to. kdtree: scipy.spatial.c...
astrobase/lcproc/lcsfeatures.py
def get_starfeatures(lcfile, outdir, kdtree, objlist, lcflist, neighbor_radius_arcsec, deredden=True, custom_bandpasses=None, lcformat='hat-sql', ...
def get_starfeatures(lcfile, outdir, kdtree, objlist, lcflist, neighbor_radius_arcsec, deredden=True, custom_bandpasses=None, lcformat='hat-sql', ...
[ "This", "runs", "the", "functions", "from", ":", "py", ":", "func", ":", "astrobase", ".", "varclass", ".", "starfeatures", "on", "a", "single", "light", "curve", "file", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/lcsfeatures.py#L94-L306
[ "def", "get_starfeatures", "(", "lcfile", ",", "outdir", ",", "kdtree", ",", "objlist", ",", "lcflist", ",", "neighbor_radius_arcsec", ",", "deredden", "=", "True", ",", "custom_bandpasses", "=", "None", ",", "lcformat", "=", "'hat-sql'", ",", "lcformatdir", "...
2922a14619d183fb28005fa7d02027ac436f2265
valid
_starfeatures_worker
This wraps starfeatures.
astrobase/lcproc/lcsfeatures.py
def _starfeatures_worker(task): ''' This wraps starfeatures. ''' try: (lcfile, outdir, kdtree, objlist, lcflist, neighbor_radius_arcsec, deredden, custom_bandpasses, lcformat, lcformatdir) = task return get_starfeatures(lcfile, outdir, ...
def _starfeatures_worker(task): ''' This wraps starfeatures. ''' try: (lcfile, outdir, kdtree, objlist, lcflist, neighbor_radius_arcsec, deredden, custom_bandpasses, lcformat, lcformatdir) = task return get_starfeatures(lcfile, outdir, ...
[ "This", "wraps", "starfeatures", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/lcsfeatures.py#L310-L329
[ "def", "_starfeatures_worker", "(", "task", ")", ":", "try", ":", "(", "lcfile", ",", "outdir", ",", "kdtree", ",", "objlist", ",", "lcflist", ",", "neighbor_radius_arcsec", ",", "deredden", ",", "custom_bandpasses", ",", "lcformat", ",", "lcformatdir", ")", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
serial_starfeatures
This drives the `get_starfeatures` function for a collection of LCs. Parameters ---------- lclist : list of str The list of light curve file names to process. outdir : str The output directory where the results will be placed. lc_catalog_pickle : str The path to a catalog...
astrobase/lcproc/lcsfeatures.py
def serial_starfeatures(lclist, outdir, lc_catalog_pickle, neighbor_radius_arcsec, maxobjects=None, deredden=True, custom_bandpasses=None, lcformat='hat...
def serial_starfeatures(lclist, outdir, lc_catalog_pickle, neighbor_radius_arcsec, maxobjects=None, deredden=True, custom_bandpasses=None, lcformat='hat...
[ "This", "drives", "the", "get_starfeatures", "function", "for", "a", "collection", "of", "LCs", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/lcsfeatures.py#L332-L483
[ "def", "serial_starfeatures", "(", "lclist", ",", "outdir", ",", "lc_catalog_pickle", ",", "neighbor_radius_arcsec", ",", "maxobjects", "=", "None", ",", "deredden", "=", "True", ",", "custom_bandpasses", "=", "None", ",", "lcformat", "=", "'hat-sql'", ",", "lcf...
2922a14619d183fb28005fa7d02027ac436f2265
valid
parallel_starfeatures
This runs `get_starfeatures` in parallel for all light curves in `lclist`. Parameters ---------- lclist : list of str The list of light curve file names to process. outdir : str The output directory where the results will be placed. lc_catalog_pickle : str The path to a c...
astrobase/lcproc/lcsfeatures.py
def parallel_starfeatures(lclist, outdir, lc_catalog_pickle, neighbor_radius_arcsec, maxobjects=None, deredden=True, custom_bandpasses=None, ...
def parallel_starfeatures(lclist, outdir, lc_catalog_pickle, neighbor_radius_arcsec, maxobjects=None, deredden=True, custom_bandpasses=None, ...
[ "This", "runs", "get_starfeatures", "in", "parallel", "for", "all", "light", "curves", "in", "lclist", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/lcsfeatures.py#L487-L660
[ "def", "parallel_starfeatures", "(", "lclist", ",", "outdir", ",", "lc_catalog_pickle", ",", "neighbor_radius_arcsec", ",", "maxobjects", "=", "None", ",", "deredden", "=", "True", ",", "custom_bandpasses", "=", "None", ",", "lcformat", "=", "'hat-sql'", ",", "l...
2922a14619d183fb28005fa7d02027ac436f2265
valid
parallel_starfeatures_lcdir
This runs parallel star feature extraction for a directory of LCs. Parameters ---------- lcdir : list of str The directory to search for light curves. outdir : str The output directory where the results will be placed. lc_catalog_pickle : str The path to a catalog contain...
astrobase/lcproc/lcsfeatures.py
def parallel_starfeatures_lcdir(lcdir, outdir, lc_catalog_pickle, neighbor_radius_arcsec, fileglob=None, maxobjects=None, deredd...
def parallel_starfeatures_lcdir(lcdir, outdir, lc_catalog_pickle, neighbor_radius_arcsec, fileglob=None, maxobjects=None, deredd...
[ "This", "runs", "parallel", "star", "feature", "extraction", "for", "a", "directory", "of", "LCs", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/lcsfeatures.py#L664-L875
[ "def", "parallel_starfeatures_lcdir", "(", "lcdir", ",", "outdir", ",", "lc_catalog_pickle", ",", "neighbor_radius_arcsec", ",", "fileglob", "=", "None", ",", "maxobjects", "=", "None", ",", "deredden", "=", "True", ",", "custom_bandpasses", "=", "None", ",", "l...
2922a14619d183fb28005fa7d02027ac436f2265
valid
checkplot_dict
This writes a multiple lspinfo checkplot to a dict. This function can take input from multiple lspinfo dicts (e.g. a list of output dicts or gzipped pickles of dicts from independent runs of BLS, PDM, AoV, or GLS period-finders in periodbase). NOTE: if `lspinfolist` contains more than one lspinfo obje...
astrobase/checkplot/pkl.py
def checkplot_dict( lspinfolist, times, mags, errs, fast_mode=False, magsarefluxes=False, nperiodstouse=3, objectinfo=None, deredden_object=True, custom_bandpasses=None, gaia_submit_timeout=10.0, gaia_submit_tries=3, ...
def checkplot_dict( lspinfolist, times, mags, errs, fast_mode=False, magsarefluxes=False, nperiodstouse=3, objectinfo=None, deredden_object=True, custom_bandpasses=None, gaia_submit_timeout=10.0, gaia_submit_tries=3, ...
[ "This", "writes", "a", "multiple", "lspinfo", "checkplot", "to", "a", "dict", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/checkplot/pkl.py#L119-L905
[ "def", "checkplot_dict", "(", "lspinfolist", ",", "times", ",", "mags", ",", "errs", ",", "fast_mode", "=", "False", ",", "magsarefluxes", "=", "False", ",", "nperiodstouse", "=", "3", ",", "objectinfo", "=", "None", ",", "deredden_object", "=", "True", ",...
2922a14619d183fb28005fa7d02027ac436f2265
valid
checkplot_pickle
This writes a multiple lspinfo checkplot to a (gzipped) pickle file. This function can take input from multiple lspinfo dicts (e.g. a list of output dicts or gzipped pickles of dicts from independent runs of BLS, PDM, AoV, or GLS period-finders in periodbase). NOTE: if `lspinfolist` contains more than...
astrobase/checkplot/pkl.py
def checkplot_pickle( lspinfolist, times, mags, errs, fast_mode=False, magsarefluxes=False, nperiodstouse=3, objectinfo=None, deredden_object=True, custom_bandpasses=None, gaia_submit_timeout=10.0, gaia_submit_tries=3, ...
def checkplot_pickle( lspinfolist, times, mags, errs, fast_mode=False, magsarefluxes=False, nperiodstouse=3, objectinfo=None, deredden_object=True, custom_bandpasses=None, gaia_submit_timeout=10.0, gaia_submit_tries=3, ...
[ "This", "writes", "a", "multiple", "lspinfo", "checkplot", "to", "a", "(", "gzipped", ")", "pickle", "file", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/checkplot/pkl.py#L913-L1523
[ "def", "checkplot_pickle", "(", "lspinfolist", ",", "times", ",", "mags", ",", "errs", ",", "fast_mode", "=", "False", ",", "magsarefluxes", "=", "False", ",", "nperiodstouse", "=", "3", ",", "objectinfo", "=", "None", ",", "deredden_object", "=", "True", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
checkplot_pickle_update
This updates the current checkplotdict with updated values provided. Parameters ---------- currentcp : dict or str This is either a checkplotdict produced by `checkplot_pickle` above or a checkplot pickle file produced by the same function. This checkplot will be updated from the ...
astrobase/checkplot/pkl.py
def checkplot_pickle_update( currentcp, updatedcp, outfile=None, outgzip=False, pickleprotocol=None, verbose=True ): '''This updates the current checkplotdict with updated values provided. Parameters ---------- currentcp : dict or str This is ei...
def checkplot_pickle_update( currentcp, updatedcp, outfile=None, outgzip=False, pickleprotocol=None, verbose=True ): '''This updates the current checkplotdict with updated values provided. Parameters ---------- currentcp : dict or str This is ei...
[ "This", "updates", "the", "current", "checkplotdict", "with", "updated", "values", "provided", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/checkplot/pkl.py#L1527-L1689
[ "def", "checkplot_pickle_update", "(", "currentcp", ",", "updatedcp", ",", "outfile", "=", "None", ",", "outgzip", "=", "False", ",", "pickleprotocol", "=", "None", ",", "verbose", "=", "True", ")", ":", "# break out python 2.7 and > 3 nonsense", "if", "sys", "....
2922a14619d183fb28005fa7d02027ac436f2265
valid
get_frequency_grid
This calculates a frequency grid for the period finding functions in this module. Based on the autofrequency function in astropy.stats.lombscargle. http://docs.astropy.org/en/stable/_modules/astropy/stats/lombscargle/core.html#LombScargle.autofrequency
astrobase/periodbase/_oldpf.py
def get_frequency_grid(times, samplesperpeak=5, nyquistfactor=5, minfreq=None, maxfreq=None, returnf0dfnf=False): '''This calculates a frequency grid for the period finding functions in this module...
def get_frequency_grid(times, samplesperpeak=5, nyquistfactor=5, minfreq=None, maxfreq=None, returnf0dfnf=False): '''This calculates a frequency grid for the period finding functions in this module...
[ "This", "calculates", "a", "frequency", "grid", "for", "the", "period", "finding", "functions", "in", "this", "module", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/periodbase/_oldpf.py#L88-L122
[ "def", "get_frequency_grid", "(", "times", ",", "samplesperpeak", "=", "5", ",", "nyquistfactor", "=", "5", ",", "minfreq", "=", "None", ",", "maxfreq", "=", "None", ",", "returnf0dfnf", "=", "False", ")", ":", "baseline", "=", "times", ".", "max", "(", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
pwd_phasebin
This bins the phased mag series using the given binsize.
astrobase/periodbase/_oldpf.py
def pwd_phasebin(phases, mags, binsize=0.002, minbin=9): ''' This bins the phased mag series using the given binsize. ''' bins = np.arange(0.0, 1.0, binsize) binnedphaseinds = npdigitize(phases, bins) binnedphases, binnedmags = [], [] for x in npunique(binnedphaseinds): thisbin_...
def pwd_phasebin(phases, mags, binsize=0.002, minbin=9): ''' This bins the phased mag series using the given binsize. ''' bins = np.arange(0.0, 1.0, binsize) binnedphaseinds = npdigitize(phases, bins) binnedphases, binnedmags = [], [] for x in npunique(binnedphaseinds): thisbin_...
[ "This", "bins", "the", "phased", "mag", "series", "using", "the", "given", "binsize", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/periodbase/_oldpf.py#L226-L246
[ "def", "pwd_phasebin", "(", "phases", ",", "mags", ",", "binsize", "=", "0.002", ",", "minbin", "=", "9", ")", ":", "bins", "=", "np", ".", "arange", "(", "0.0", ",", "1.0", ",", "binsize", ")", "binnedphaseinds", "=", "npdigitize", "(", "phases", ",...
2922a14619d183fb28005fa7d02027ac436f2265
valid
pdw_worker
This is the parallel worker for the function below. task[0] = frequency for this worker task[1] = times array task[2] = mags array task[3] = fold_time task[4] = j_range task[5] = keep_threshold_1 task[6] = keep_threshold_2 task[7] = phasebinsize we don't need errs for the worker.
astrobase/periodbase/_oldpf.py
def pdw_worker(task): ''' This is the parallel worker for the function below. task[0] = frequency for this worker task[1] = times array task[2] = mags array task[3] = fold_time task[4] = j_range task[5] = keep_threshold_1 task[6] = keep_threshold_2 task[7] = phasebinsize we...
def pdw_worker(task): ''' This is the parallel worker for the function below. task[0] = frequency for this worker task[1] = times array task[2] = mags array task[3] = fold_time task[4] = j_range task[5] = keep_threshold_1 task[6] = keep_threshold_2 task[7] = phasebinsize we...
[ "This", "is", "the", "parallel", "worker", "for", "the", "function", "below", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/periodbase/_oldpf.py#L250-L325
[ "def", "pdw_worker", "(", "task", ")", ":", "frequency", "=", "task", "[", "0", "]", "times", ",", "modmags", "=", "task", "[", "1", "]", ",", "task", "[", "2", "]", "fold_time", "=", "task", "[", "3", "]", "j_range", "=", "range", "(", "task", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
pdw_period_find
This is the parallel version of the function above. Uses the string length method in Dworetsky 1983 to calculate the period of a time-series of magnitude measurements and associated magnitude errors. This can optionally bin in phase to try to speed up the calculation. PARAMETERS: time: series of ...
astrobase/periodbase/_oldpf.py
def pdw_period_find(times, mags, errs, autofreq=True, init_p=None, end_p=None, f_step=1.0e-4, phasebinsize=None, sigclip=10.0, nworkers=None...
def pdw_period_find(times, mags, errs, autofreq=True, init_p=None, end_p=None, f_step=1.0e-4, phasebinsize=None, sigclip=10.0, nworkers=None...
[ "This", "is", "the", "parallel", "version", "of", "the", "function", "above", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/periodbase/_oldpf.py#L329-L510
[ "def", "pdw_period_find", "(", "times", ",", "mags", ",", "errs", ",", "autofreq", "=", "True", ",", "init_p", "=", "None", ",", "end_p", "=", "None", ",", "f_step", "=", "1.0e-4", ",", "phasebinsize", "=", "None", ",", "sigclip", "=", "10.0", ",", "...
2922a14619d183fb28005fa7d02027ac436f2265
valid
townsend_lombscargle_value
This calculates the periodogram value for each omega (= 2*pi*f). Mags must be normalized to zero with variance scaled to unity.
astrobase/periodbase/_oldpf.py
def townsend_lombscargle_value(times, mags, omega): ''' This calculates the periodogram value for each omega (= 2*pi*f). Mags must be normalized to zero with variance scaled to unity. ''' cos_omegat = npcos(omega*times) sin_omegat = npsin(omega*times) xc = npsum(mags*cos_omegat) xs = n...
def townsend_lombscargle_value(times, mags, omega): ''' This calculates the periodogram value for each omega (= 2*pi*f). Mags must be normalized to zero with variance scaled to unity. ''' cos_omegat = npcos(omega*times) sin_omegat = npsin(omega*times) xc = npsum(mags*cos_omegat) xs = n...
[ "This", "calculates", "the", "periodogram", "value", "for", "each", "omega", "(", "=", "2", "*", "pi", "*", "f", ")", ".", "Mags", "must", "be", "normalized", "to", "zero", "with", "variance", "scaled", "to", "unity", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/periodbase/_oldpf.py#L518-L550
[ "def", "townsend_lombscargle_value", "(", "times", ",", "mags", ",", "omega", ")", ":", "cos_omegat", "=", "npcos", "(", "omega", "*", "times", ")", "sin_omegat", "=", "npsin", "(", "omega", "*", "times", ")", "xc", "=", "npsum", "(", "mags", "*", "cos...
2922a14619d183fb28005fa7d02027ac436f2265
valid
parallel_townsend_lsp
This calculates the Lomb-Scargle periodogram for the frequencies corresponding to the period interval (startp, endp) using a frequency step size of stepsize cycles/day. This uses the algorithm in Townsend 2010.
astrobase/periodbase/_oldpf.py
def parallel_townsend_lsp(times, mags, startp, endp, stepsize=1.0e-4, nworkers=4): ''' This calculates the Lomb-Scargle periodogram for the frequencies corresponding to the period interval (startp, endp) using a frequency step size of stepsize cycles/d...
def parallel_townsend_lsp(times, mags, startp, endp, stepsize=1.0e-4, nworkers=4): ''' This calculates the Lomb-Scargle periodogram for the frequencies corresponding to the period interval (startp, endp) using a frequency step size of stepsize cycles/d...
[ "This", "calculates", "the", "Lomb", "-", "Scargle", "periodogram", "for", "the", "frequencies", "corresponding", "to", "the", "period", "interval", "(", "startp", "endp", ")", "using", "a", "frequency", "step", "size", "of", "stepsize", "cycles", "/", "day", ...
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/periodbase/_oldpf.py#L572-L606
[ "def", "parallel_townsend_lsp", "(", "times", ",", "mags", ",", "startp", ",", "endp", ",", "stepsize", "=", "1.0e-4", ",", "nworkers", "=", "4", ")", ":", "# make sure there are no nans anywhere", "finiteind", "=", "np", ".", "isfinite", "(", "times", ")", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
scipylsp_parallel
This uses the LSP function from the scipy library, which is fast as hell. We try to make it faster by running LSP for sections of the omegas array in parallel.
astrobase/periodbase/_oldpf.py
def scipylsp_parallel(times, mags, errs, # ignored but for consistent API startp, endp, nbestpeaks=5, periodepsilon=0.1, # 0.1 stepsize=1.0e-4, ...
def scipylsp_parallel(times, mags, errs, # ignored but for consistent API startp, endp, nbestpeaks=5, periodepsilon=0.1, # 0.1 stepsize=1.0e-4, ...
[ "This", "uses", "the", "LSP", "function", "from", "the", "scipy", "library", "which", "is", "fast", "as", "hell", ".", "We", "try", "to", "make", "it", "faster", "by", "running", "LSP", "for", "sections", "of", "the", "omegas", "array", "in", "parallel",...
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/periodbase/_oldpf.py#L642-L783
[ "def", "scipylsp_parallel", "(", "times", ",", "mags", ",", "errs", ",", "# ignored but for consistent API", "startp", ",", "endp", ",", "nbestpeaks", "=", "5", ",", "periodepsilon", "=", "0.1", ",", "# 0.1", "stepsize", "=", "1.0e-4", ",", "nworkers", "=", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
get_periodicfeatures
This gets all periodic features for the object. Parameters ---------- pfpickle : str The period-finding result pickle containing period-finder results to use for the calculation of LC fit, periodogram, and phased LC features. lcbasedir : str The base directory where the light ...
astrobase/lcproc/lcpfeatures.py
def get_periodicfeatures( pfpickle, lcbasedir, outdir, fourierorder=5, # these are depth, duration, ingress duration transitparams=(-0.01,0.1,0.1), # these are depth, duration, depth ratio, secphase ebparams=(-0.2,0.3,0.7,0.5), pdiff_threshold=1.0e...
def get_periodicfeatures( pfpickle, lcbasedir, outdir, fourierorder=5, # these are depth, duration, ingress duration transitparams=(-0.01,0.1,0.1), # these are depth, duration, depth ratio, secphase ebparams=(-0.2,0.3,0.7,0.5), pdiff_threshold=1.0e...
[ "This", "gets", "all", "periodic", "features", "for", "the", "object", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/lcpfeatures.py#L97-L547
[ "def", "get_periodicfeatures", "(", "pfpickle", ",", "lcbasedir", ",", "outdir", ",", "fourierorder", "=", "5", ",", "# these are depth, duration, ingress duration", "transitparams", "=", "(", "-", "0.01", ",", "0.1", ",", "0.1", ")", ",", "# these are depth, durati...
2922a14619d183fb28005fa7d02027ac436f2265
valid
_periodicfeatures_worker
This is a parallel worker for the drivers below.
astrobase/lcproc/lcpfeatures.py
def _periodicfeatures_worker(task): ''' This is a parallel worker for the drivers below. ''' pfpickle, lcbasedir, outdir, starfeatures, kwargs = task try: return get_periodicfeatures(pfpickle, lcbasedir, outdir, ...
def _periodicfeatures_worker(task): ''' This is a parallel worker for the drivers below. ''' pfpickle, lcbasedir, outdir, starfeatures, kwargs = task try: return get_periodicfeatures(pfpickle, lcbasedir, outdir, ...
[ "This", "is", "a", "parallel", "worker", "for", "the", "drivers", "below", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/lcpfeatures.py#L551-L569
[ "def", "_periodicfeatures_worker", "(", "task", ")", ":", "pfpickle", ",", "lcbasedir", ",", "outdir", ",", "starfeatures", ",", "kwargs", "=", "task", "try", ":", "return", "get_periodicfeatures", "(", "pfpickle", ",", "lcbasedir", ",", "outdir", ",", "starfe...
2922a14619d183fb28005fa7d02027ac436f2265
valid
serial_periodicfeatures
This drives the periodicfeatures collection for a list of periodfinding pickles. Parameters ---------- pfpkl_list : list of str The list of period-finding pickles to use. lcbasedir : str The base directory where the associated light curves are located. outdir : str Th...
astrobase/lcproc/lcpfeatures.py
def serial_periodicfeatures(pfpkl_list, lcbasedir, outdir, starfeaturesdir=None, fourierorder=5, # these are depth, duration, ingress duration transitpa...
def serial_periodicfeatures(pfpkl_list, lcbasedir, outdir, starfeaturesdir=None, fourierorder=5, # these are depth, duration, ingress duration transitpa...
[ "This", "drives", "the", "periodicfeatures", "collection", "for", "a", "list", "of", "periodfinding", "pickles", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/lcpfeatures.py#L573-L776
[ "def", "serial_periodicfeatures", "(", "pfpkl_list", ",", "lcbasedir", ",", "outdir", ",", "starfeaturesdir", "=", "None", ",", "fourierorder", "=", "5", ",", "# these are depth, duration, ingress duration", "transitparams", "=", "(", "-", "0.01", ",", "0.1", ",", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
parallel_periodicfeatures
This runs periodic feature generation in parallel for all periodfinding pickles in the input list. Parameters ---------- pfpkl_list : list of str The list of period-finding pickles to use. lcbasedir : str The base directory where the associated light curves are located. outdi...
astrobase/lcproc/lcpfeatures.py
def parallel_periodicfeatures(pfpkl_list, lcbasedir, outdir, starfeaturesdir=None, fourierorder=5, # these are depth, duration, ingress duration ...
def parallel_periodicfeatures(pfpkl_list, lcbasedir, outdir, starfeaturesdir=None, fourierorder=5, # these are depth, duration, ingress duration ...
[ "This", "runs", "periodic", "feature", "generation", "in", "parallel", "for", "all", "periodfinding", "pickles", "in", "the", "input", "list", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/lcpfeatures.py#L780-L979
[ "def", "parallel_periodicfeatures", "(", "pfpkl_list", ",", "lcbasedir", ",", "outdir", ",", "starfeaturesdir", "=", "None", ",", "fourierorder", "=", "5", ",", "# these are depth, duration, ingress duration", "transitparams", "=", "(", "-", "0.01", ",", "0.1", ",",...
2922a14619d183fb28005fa7d02027ac436f2265
valid
parallel_periodicfeatures_lcdir
This runs parallel periodicfeature extraction for a directory of periodfinding result pickles. Parameters ---------- pfpkl_dir : str The directory containing the pickles to process. lcbasedir : str The directory where all of the associated light curve files are located. outdi...
astrobase/lcproc/lcpfeatures.py
def parallel_periodicfeatures_lcdir( pfpkl_dir, lcbasedir, outdir, pfpkl_glob='periodfinding-*.pkl*', starfeaturesdir=None, fourierorder=5, # these are depth, duration, ingress duration transitparams=(-0.01,0.1,0.1), # these are depth, duration, de...
def parallel_periodicfeatures_lcdir( pfpkl_dir, lcbasedir, outdir, pfpkl_glob='periodfinding-*.pkl*', starfeaturesdir=None, fourierorder=5, # these are depth, duration, ingress duration transitparams=(-0.01,0.1,0.1), # these are depth, duration, de...
[ "This", "runs", "parallel", "periodicfeature", "extraction", "for", "a", "directory", "of", "periodfinding", "result", "pickles", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/lcpfeatures.py#L983-L1207
[ "def", "parallel_periodicfeatures_lcdir", "(", "pfpkl_dir", ",", "lcbasedir", ",", "outdir", ",", "pfpkl_glob", "=", "'periodfinding-*.pkl*'", ",", "starfeaturesdir", "=", "None", ",", "fourierorder", "=", "5", ",", "# these are depth, duration, ingress duration", "transi...
2922a14619d183fb28005fa7d02027ac436f2265
valid
_parse_xmatch_catalog_header
This parses the header for a catalog file and returns it as a file object. Parameters ---------- xc : str The file name of an xmatch catalog prepared previously. xk : list of str This is a list of column names to extract from the xmatch catalog. Returns ------- tuple ...
astrobase/checkplot/pkl_xmatch.py
def _parse_xmatch_catalog_header(xc, xk): ''' This parses the header for a catalog file and returns it as a file object. Parameters ---------- xc : str The file name of an xmatch catalog prepared previously. xk : list of str This is a list of column names to extract from the x...
def _parse_xmatch_catalog_header(xc, xk): ''' This parses the header for a catalog file and returns it as a file object. Parameters ---------- xc : str The file name of an xmatch catalog prepared previously. xk : list of str This is a list of column names to extract from the x...
[ "This", "parses", "the", "header", "for", "a", "catalog", "file", "and", "returns", "it", "as", "a", "file", "object", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/checkplot/pkl_xmatch.py#L75-L154
[ "def", "_parse_xmatch_catalog_header", "(", "xc", ",", "xk", ")", ":", "catdef", "=", "[", "]", "# read in this catalog and transparently handle gzipped files", "if", "xc", ".", "endswith", "(", "'.gz'", ")", ":", "infd", "=", "gzip", ".", "open", "(", "xc", "...
2922a14619d183fb28005fa7d02027ac436f2265
valid
load_xmatch_external_catalogs
This loads the external xmatch catalogs into a dict for use in an xmatch. Parameters ---------- xmatchto : list of str This is a list of paths to all the catalog text files that will be loaded. The text files must be 'CSVs' that use the '|' character as the separator betwe...
astrobase/checkplot/pkl_xmatch.py
def load_xmatch_external_catalogs(xmatchto, xmatchkeys, outfile=None): '''This loads the external xmatch catalogs into a dict for use in an xmatch. Parameters ---------- xmatchto : list of str This is a list of paths to all the catalog text files that will be loaded. The text ...
def load_xmatch_external_catalogs(xmatchto, xmatchkeys, outfile=None): '''This loads the external xmatch catalogs into a dict for use in an xmatch. Parameters ---------- xmatchto : list of str This is a list of paths to all the catalog text files that will be loaded. The text ...
[ "This", "loads", "the", "external", "xmatch", "catalogs", "into", "a", "dict", "for", "use", "in", "an", "xmatch", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/checkplot/pkl_xmatch.py#L158-L301
[ "def", "load_xmatch_external_catalogs", "(", "xmatchto", ",", "xmatchkeys", ",", "outfile", "=", "None", ")", ":", "outdict", "=", "{", "}", "for", "xc", ",", "xk", "in", "zip", "(", "xmatchto", ",", "xmatchkeys", ")", ":", "parsed_catdef", "=", "_parse_xm...
2922a14619d183fb28005fa7d02027ac436f2265
valid
xmatch_external_catalogs
This matches the current object in the checkplotdict to all of the external match catalogs specified. Parameters ---------- checkplotdict : dict This is a checkplotdict, generated by either the `checkplot_dict` function, or read in from a `_read_checkplot_picklefile` function. This ...
astrobase/checkplot/pkl_xmatch.py
def xmatch_external_catalogs(checkplotdict, xmatchinfo, xmatchradiusarcsec=2.0, returndirect=False, updatexmatch=True, savepickle=None): '''This matches the current object...
def xmatch_external_catalogs(checkplotdict, xmatchinfo, xmatchradiusarcsec=2.0, returndirect=False, updatexmatch=True, savepickle=None): '''This matches the current object...
[ "This", "matches", "the", "current", "object", "in", "the", "checkplotdict", "to", "all", "of", "the", "external", "match", "catalogs", "specified", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/checkplot/pkl_xmatch.py#L305-L501
[ "def", "xmatch_external_catalogs", "(", "checkplotdict", ",", "xmatchinfo", ",", "xmatchradiusarcsec", "=", "2.0", ",", "returndirect", "=", "False", ",", "updatexmatch", "=", "True", ",", "savepickle", "=", "None", ")", ":", "# load the xmatch info", "if", "isins...
2922a14619d183fb28005fa7d02027ac436f2265
valid
angle_wrap
Wraps the input angle to 360.0 degrees. Parameters ---------- angle : float The angle to wrap around 360.0 deg. radians : bool If True, will assume that the input is in radians. The output will then also be in radians. Returns ------- float Wrapped angle....
astrobase/coordutils.py
def angle_wrap(angle, radians=False): '''Wraps the input angle to 360.0 degrees. Parameters ---------- angle : float The angle to wrap around 360.0 deg. radians : bool If True, will assume that the input is in radians. The output will then also be in radians. Returns ...
def angle_wrap(angle, radians=False): '''Wraps the input angle to 360.0 degrees. Parameters ---------- angle : float The angle to wrap around 360.0 deg. radians : bool If True, will assume that the input is in radians. The output will then also be in radians. Returns ...
[ "Wraps", "the", "input", "angle", "to", "360", ".", "0", "degrees", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/coordutils.py#L24-L57
[ "def", "angle_wrap", "(", "angle", ",", "radians", "=", "False", ")", ":", "if", "radians", ":", "wrapped", "=", "angle", "%", "(", "2.0", "*", "pi_value", ")", "if", "wrapped", "<", "0.0", ":", "wrapped", "=", "2.0", "*", "pi_value", "+", "wrapped",...
2922a14619d183fb28005fa7d02027ac436f2265
valid
decimal_to_dms
Converts from decimal degrees (for declination coords) to DD:MM:SS. Parameters ---------- decimal_value : float A decimal value to convert to degrees, minutes, seconds sexagesimal format. Returns ------- tuple A four element tuple is returned: (sign, HH, MM, SS.ssss.....
astrobase/coordutils.py
def decimal_to_dms(decimal_value): '''Converts from decimal degrees (for declination coords) to DD:MM:SS. Parameters ---------- decimal_value : float A decimal value to convert to degrees, minutes, seconds sexagesimal format. Returns ------- tuple A four element t...
def decimal_to_dms(decimal_value): '''Converts from decimal degrees (for declination coords) to DD:MM:SS. Parameters ---------- decimal_value : float A decimal value to convert to degrees, minutes, seconds sexagesimal format. Returns ------- tuple A four element t...
[ "Converts", "from", "decimal", "degrees", "(", "for", "declination", "coords", ")", "to", "DD", ":", "MM", ":", "SS", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/coordutils.py#L61-L97
[ "def", "decimal_to_dms", "(", "decimal_value", ")", ":", "if", "decimal_value", "<", "0", ":", "negative", "=", "True", "dec_val", "=", "fabs", "(", "decimal_value", ")", "else", ":", "negative", "=", "False", "dec_val", "=", "decimal_value", "degrees", "=",...
2922a14619d183fb28005fa7d02027ac436f2265
valid
decimal_to_hms
Converts from decimal degrees (for RA coords) to HH:MM:SS. Parameters ---------- decimal_value : float A decimal value to convert to hours, minutes, seconds. Negative values will be wrapped around 360.0. Returns ------- tuple A three element tuple is returned: (HH, MM...
astrobase/coordutils.py
def decimal_to_hms(decimal_value): '''Converts from decimal degrees (for RA coords) to HH:MM:SS. Parameters ---------- decimal_value : float A decimal value to convert to hours, minutes, seconds. Negative values will be wrapped around 360.0. Returns ------- tuple ...
def decimal_to_hms(decimal_value): '''Converts from decimal degrees (for RA coords) to HH:MM:SS. Parameters ---------- decimal_value : float A decimal value to convert to hours, minutes, seconds. Negative values will be wrapped around 360.0. Returns ------- tuple ...
[ "Converts", "from", "decimal", "degrees", "(", "for", "RA", "coords", ")", "to", "HH", ":", "MM", ":", "SS", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/coordutils.py#L101-L146
[ "def", "decimal_to_hms", "(", "decimal_value", ")", ":", "# wrap to 360.0", "if", "decimal_value", "<", "0", ":", "dec_wrapped", "=", "360.0", "+", "decimal_value", "else", ":", "dec_wrapped", "=", "decimal_value", "# convert to decimal hours first", "dec_hours", "=",...
2922a14619d183fb28005fa7d02027ac436f2265
valid
hms_str_to_tuple
Converts a string of the form HH:MM:SS or HH MM SS to a tuple of the form (HH, MM, SS). Parameters ---------- hms_string : str A RA coordinate string of the form 'HH:MM:SS.sss' or 'HH MM SS.sss'. Returns ------- tuple A three element tuple is returned (HH, MM, SS.ssss...)
astrobase/coordutils.py
def hms_str_to_tuple(hms_string): '''Converts a string of the form HH:MM:SS or HH MM SS to a tuple of the form (HH, MM, SS). Parameters ---------- hms_string : str A RA coordinate string of the form 'HH:MM:SS.sss' or 'HH MM SS.sss'. Returns ------- tuple A three eleme...
def hms_str_to_tuple(hms_string): '''Converts a string of the form HH:MM:SS or HH MM SS to a tuple of the form (HH, MM, SS). Parameters ---------- hms_string : str A RA coordinate string of the form 'HH:MM:SS.sss' or 'HH MM SS.sss'. Returns ------- tuple A three eleme...
[ "Converts", "a", "string", "of", "the", "form", "HH", ":", "MM", ":", "SS", "or", "HH", "MM", "SS", "to", "a", "tuple", "of", "the", "form", "(", "HH", "MM", "SS", ")", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/coordutils.py#L150-L175
[ "def", "hms_str_to_tuple", "(", "hms_string", ")", ":", "if", "':'", "in", "hms_string", ":", "separator", "=", "':'", "else", ":", "separator", "=", "' '", "hh", ",", "mm", ",", "ss", "=", "hms_string", ".", "split", "(", "separator", ")", "return", "...
2922a14619d183fb28005fa7d02027ac436f2265
valid
dms_str_to_tuple
Converts a string of the form [+-]DD:MM:SS or [+-]DD MM SS to a tuple of the form (sign, DD, MM, SS). Parameters ---------- dms_string : str A declination coordinate string of the form '[+-]DD:MM:SS.sss' or '[+-]DD MM SS.sss'. The sign in front of DD is optional. If it's not th...
astrobase/coordutils.py
def dms_str_to_tuple(dms_string): '''Converts a string of the form [+-]DD:MM:SS or [+-]DD MM SS to a tuple of the form (sign, DD, MM, SS). Parameters ---------- dms_string : str A declination coordinate string of the form '[+-]DD:MM:SS.sss' or '[+-]DD MM SS.sss'. The sign in front ...
def dms_str_to_tuple(dms_string): '''Converts a string of the form [+-]DD:MM:SS or [+-]DD MM SS to a tuple of the form (sign, DD, MM, SS). Parameters ---------- dms_string : str A declination coordinate string of the form '[+-]DD:MM:SS.sss' or '[+-]DD MM SS.sss'. The sign in front ...
[ "Converts", "a", "string", "of", "the", "form", "[", "+", "-", "]", "DD", ":", "MM", ":", "SS", "or", "[", "+", "-", "]", "DD", "MM", "SS", "to", "a", "tuple", "of", "the", "form", "(", "sign", "DD", "MM", "SS", ")", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/coordutils.py#L179-L210
[ "def", "dms_str_to_tuple", "(", "dms_string", ")", ":", "if", "':'", "in", "dms_string", ":", "separator", "=", "':'", "else", ":", "separator", "=", "' '", "sign_dd", ",", "mm", ",", "ss", "=", "dms_string", ".", "split", "(", "separator", ")", "if", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
hms_to_decimal
Converts from HH, MM, SS to a decimal value. Parameters ---------- hours : int The HH part of a RA coordinate. minutes : int The MM part of a RA coordinate. seconds : float The SS.sss part of a RA coordinate. returndeg : bool If this is True, then will return...
astrobase/coordutils.py
def hms_to_decimal(hours, minutes, seconds, returndeg=True): '''Converts from HH, MM, SS to a decimal value. Parameters ---------- hours : int The HH part of a RA coordinate. minutes : int The MM part of a RA coordinate. seconds : float The SS.sss part of a RA coordin...
def hms_to_decimal(hours, minutes, seconds, returndeg=True): '''Converts from HH, MM, SS to a decimal value. Parameters ---------- hours : int The HH part of a RA coordinate. minutes : int The MM part of a RA coordinate. seconds : float The SS.sss part of a RA coordin...
[ "Converts", "from", "HH", "MM", "SS", "to", "a", "decimal", "value", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/coordutils.py#L256-L302
[ "def", "hms_to_decimal", "(", "hours", ",", "minutes", ",", "seconds", ",", "returndeg", "=", "True", ")", ":", "if", "hours", ">", "24", ":", "return", "None", "else", ":", "dec_hours", "=", "fabs", "(", "hours", ")", "+", "fabs", "(", "minutes", ")...
2922a14619d183fb28005fa7d02027ac436f2265
valid
dms_to_decimal
Converts from DD:MM:SS to a decimal value. Parameters ---------- sign : {'+', '-', ''} The sign part of a Dec coordinate. degrees : int The DD part of a Dec coordinate. minutes : int The MM part of a Dec coordinate. seconds : float The SS.sss part of a Dec co...
astrobase/coordutils.py
def dms_to_decimal(sign, degrees, minutes, seconds): '''Converts from DD:MM:SS to a decimal value. Parameters ---------- sign : {'+', '-', ''} The sign part of a Dec coordinate. degrees : int The DD part of a Dec coordinate. minutes : int The MM part of a Dec coordina...
def dms_to_decimal(sign, degrees, minutes, seconds): '''Converts from DD:MM:SS to a decimal value. Parameters ---------- sign : {'+', '-', ''} The sign part of a Dec coordinate. degrees : int The DD part of a Dec coordinate. minutes : int The MM part of a Dec coordina...
[ "Converts", "from", "DD", ":", "MM", ":", "SS", "to", "a", "decimal", "value", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/coordutils.py#L306-L337
[ "def", "dms_to_decimal", "(", "sign", ",", "degrees", ",", "minutes", ",", "seconds", ")", ":", "dec_deg", "=", "fabs", "(", "degrees", ")", "+", "fabs", "(", "minutes", ")", "/", "60.0", "+", "fabs", "(", "seconds", ")", "/", "3600.0", "if", "sign",...
2922a14619d183fb28005fa7d02027ac436f2265
valid
great_circle_dist
Calculates the great circle angular distance between two coords. This calculates the great circle angular distance in arcseconds between two coordinates (ra1,dec1) and (ra2,dec2). This is basically a clone of GCIRC from the IDL Astrolib. Parameters ---------- ra1,dec1 : float or array-like ...
astrobase/coordutils.py
def great_circle_dist(ra1, dec1, ra2, dec2): '''Calculates the great circle angular distance between two coords. This calculates the great circle angular distance in arcseconds between two coordinates (ra1,dec1) and (ra2,dec2). This is basically a clone of GCIRC from the IDL Astrolib. Parameters ...
def great_circle_dist(ra1, dec1, ra2, dec2): '''Calculates the great circle angular distance between two coords. This calculates the great circle angular distance in arcseconds between two coordinates (ra1,dec1) and (ra2,dec2). This is basically a clone of GCIRC from the IDL Astrolib. Parameters ...
[ "Calculates", "the", "great", "circle", "angular", "distance", "between", "two", "coords", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/coordutils.py#L345-L409
[ "def", "great_circle_dist", "(", "ra1", ",", "dec1", ",", "ra2", ",", "dec2", ")", ":", "# wrap RA if negative or larger than 360.0 deg", "in_ra1", "=", "ra1", "%", "360.0", "in_ra1", "=", "in_ra1", "+", "360.0", "*", "(", "in_ra1", "<", "0.0", ")", "in_ra2"...
2922a14619d183fb28005fa7d02027ac436f2265
valid
xmatch_basic
Finds the closest object in (`ra2`, `dec2`) to scalar coordinate pair (`ra1`, `dec1`) and returns the distance in arcseconds. This is a quick matcher that uses the `great_circle_dist` function to find the closest object in (`ra2`, `dec2`) within `match_radius` arcseconds to (`ra1`, `dec1`). (`ra1`, `de...
astrobase/coordutils.py
def xmatch_basic(ra1, dec1, ra2, dec2, match_radius=5.0): '''Finds the closest object in (`ra2`, `dec2`) to scalar coordinate pair (`ra1`, `dec1`) and returns the distance in arcseconds. This is a quick matcher that uses the `great_circle_dist` function to find the closest object in (`ra2`, `dec2`) wit...
def xmatch_basic(ra1, dec1, ra2, dec2, match_radius=5.0): '''Finds the closest object in (`ra2`, `dec2`) to scalar coordinate pair (`ra1`, `dec1`) and returns the distance in arcseconds. This is a quick matcher that uses the `great_circle_dist` function to find the closest object in (`ra2`, `dec2`) wit...
[ "Finds", "the", "closest", "object", "in", "(", "ra2", "dec2", ")", "to", "scalar", "coordinate", "pair", "(", "ra1", "dec1", ")", "and", "returns", "the", "distance", "in", "arcseconds", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/coordutils.py#L413-L450
[ "def", "xmatch_basic", "(", "ra1", ",", "dec1", ",", "ra2", ",", "dec2", ",", "match_radius", "=", "5.0", ")", ":", "min_dist_arcsec", "=", "np", ".", "min", "(", "great_circle_dist", "(", "ra1", ",", "dec1", ",", "ra2", ",", "dec2", ")", ")", "if", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
xmatch_neighbors
Finds the closest objects in (`ra2`, `dec2`) to scalar coordinate pair (`ra1`, `dec1`) and returns the indices of the objects that match. This is a quick matcher that uses the `great_circle_dist` function to find the closest object in (`ra2`, `dec2`) within `match_radius` arcseconds to (`ra1`, `dec1`)....
astrobase/coordutils.py
def xmatch_neighbors(ra1, dec1, ra2, dec2, match_radius=60.0, includeself=False, sortresults=True): '''Finds the closest objects in (`ra2`, `dec2`) to scalar coordinate pair (`ra1`, `dec1`) and returns the indices of the objects...
def xmatch_neighbors(ra1, dec1, ra2, dec2, match_radius=60.0, includeself=False, sortresults=True): '''Finds the closest objects in (`ra2`, `dec2`) to scalar coordinate pair (`ra1`, `dec1`) and returns the indices of the objects...
[ "Finds", "the", "closest", "objects", "in", "(", "ra2", "dec2", ")", "to", "scalar", "coordinate", "pair", "(", "ra1", "dec1", ")", "and", "returns", "the", "indices", "of", "the", "objects", "that", "match", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/coordutils.py#L454-L521
[ "def", "xmatch_neighbors", "(", "ra1", ",", "dec1", ",", "ra2", ",", "dec2", ",", "match_radius", "=", "60.0", ",", "includeself", "=", "False", ",", "sortresults", "=", "True", ")", ":", "dist", "=", "great_circle_dist", "(", "ra1", ",", "dec1", ",", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
make_kdtree
This makes a `scipy.spatial.CKDTree` on (`ra`, `decl`). Parameters ---------- ra,decl : array-like The right ascension and declination coordinate pairs in decimal degrees. Returns ------- `scipy.spatial.CKDTree` The cKDTRee object generated by this function is returned and ca...
astrobase/coordutils.py
def make_kdtree(ra, decl): '''This makes a `scipy.spatial.CKDTree` on (`ra`, `decl`). Parameters ---------- ra,decl : array-like The right ascension and declination coordinate pairs in decimal degrees. Returns ------- `scipy.spatial.CKDTree` The cKDTRee object generated b...
def make_kdtree(ra, decl): '''This makes a `scipy.spatial.CKDTree` on (`ra`, `decl`). Parameters ---------- ra,decl : array-like The right ascension and declination coordinate pairs in decimal degrees. Returns ------- `scipy.spatial.CKDTree` The cKDTRee object generated b...
[ "This", "makes", "a", "scipy", ".", "spatial", ".", "CKDTree", "on", "(", "ra", "decl", ")", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/coordutils.py#L529-L559
[ "def", "make_kdtree", "(", "ra", ",", "decl", ")", ":", "# get the xyz unit vectors from ra,decl", "# since i had to remind myself:", "# https://en.wikipedia.org/wiki/Equatorial_coordinate_system", "cosdecl", "=", "np", ".", "cos", "(", "np", ".", "radians", "(", "decl", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
conesearch_kdtree
This does a cone-search around (`racenter`, `declcenter`) in `kdtree`. Parameters ---------- kdtree : scipy.spatial.CKDTree This is a kdtree object generated by the `make_kdtree` function. racenter,declcenter : float or array-like This is the center coordinate to run the cone-search a...
astrobase/coordutils.py
def conesearch_kdtree(kdtree, racenter, declcenter, searchradiusdeg, conesearchworkers=1): '''This does a cone-search around (`racenter`, `declcenter`) in `kdtree`. Parameters ---------- kdtree : scipy.spatial.CKDT...
def conesearch_kdtree(kdtree, racenter, declcenter, searchradiusdeg, conesearchworkers=1): '''This does a cone-search around (`racenter`, `declcenter`) in `kdtree`. Parameters ---------- kdtree : scipy.spatial.CKDT...
[ "This", "does", "a", "cone", "-", "search", "around", "(", "racenter", "declcenter", ")", "in", "kdtree", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/coordutils.py#L563-L614
[ "def", "conesearch_kdtree", "(", "kdtree", ",", "racenter", ",", "declcenter", ",", "searchradiusdeg", ",", "conesearchworkers", "=", "1", ")", ":", "cosdecl", "=", "np", ".", "cos", "(", "np", ".", "radians", "(", "declcenter", ")", ")", "sindecl", "=", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
xmatch_kdtree
This cross-matches between `kdtree` and (`extra`, `extdecl`) arrays. Returns the indices of the kdtree and the indices of extra, extdecl that xmatch successfully. Parameters ---------- kdtree : scipy.spatial.CKDTree This is a kdtree object generated by the `make_kdtree` function. ext...
astrobase/coordutils.py
def xmatch_kdtree(kdtree, extra, extdecl, xmatchdistdeg, closestonly=True): '''This cross-matches between `kdtree` and (`extra`, `extdecl`) arrays. Returns the indices of the kdtree and the indices of extra, extdecl that xmatch successfully. Parame...
def xmatch_kdtree(kdtree, extra, extdecl, xmatchdistdeg, closestonly=True): '''This cross-matches between `kdtree` and (`extra`, `extdecl`) arrays. Returns the indices of the kdtree and the indices of extra, extdecl that xmatch successfully. Parame...
[ "This", "cross", "-", "matches", "between", "kdtree", "and", "(", "extra", "extdecl", ")", "arrays", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/coordutils.py#L618-L692
[ "def", "xmatch_kdtree", "(", "kdtree", ",", "extra", ",", "extdecl", ",", "xmatchdistdeg", ",", "closestonly", "=", "True", ")", ":", "ext_cosdecl", "=", "np", ".", "cos", "(", "np", ".", "radians", "(", "extdecl", ")", ")", "ext_sindecl", "=", "np", "...
2922a14619d183fb28005fa7d02027ac436f2265
valid
total_proper_motion
This calculates the total proper motion of an object. Parameters ---------- pmra : float or array-like The proper motion(s) in right ascension, measured in mas/yr. pmdecl : float or array-like The proper motion(s) in declination, measured in mas/yr. decl : float or array-like ...
astrobase/coordutils.py
def total_proper_motion(pmra, pmdecl, decl): '''This calculates the total proper motion of an object. Parameters ---------- pmra : float or array-like The proper motion(s) in right ascension, measured in mas/yr. pmdecl : float or array-like The proper motion(s) in declination, me...
def total_proper_motion(pmra, pmdecl, decl): '''This calculates the total proper motion of an object. Parameters ---------- pmra : float or array-like The proper motion(s) in right ascension, measured in mas/yr. pmdecl : float or array-like The proper motion(s) in declination, me...
[ "This", "calculates", "the", "total", "proper", "motion", "of", "an", "object", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/coordutils.py#L700-L726
[ "def", "total_proper_motion", "(", "pmra", ",", "pmdecl", ",", "decl", ")", ":", "pm", "=", "np", ".", "sqrt", "(", "pmdecl", "*", "pmdecl", "+", "pmra", "*", "pmra", "*", "np", ".", "cos", "(", "np", ".", "radians", "(", "decl", ")", ")", "*", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
equatorial_to_galactic
This converts from equatorial coords to galactic coords. Parameters ---------- ra : float or array-like Right ascension values(s) in decimal degrees. decl : float or array-like Declination value(s) in decimal degrees. equinox : str The equinox that the coordinates are mea...
astrobase/coordutils.py
def equatorial_to_galactic(ra, decl, equinox='J2000'): '''This converts from equatorial coords to galactic coords. Parameters ---------- ra : float or array-like Right ascension values(s) in decimal degrees. decl : float or array-like Declination value(s) in decimal degrees. ...
def equatorial_to_galactic(ra, decl, equinox='J2000'): '''This converts from equatorial coords to galactic coords. Parameters ---------- ra : float or array-like Right ascension values(s) in decimal degrees. decl : float or array-like Declination value(s) in decimal degrees. ...
[ "This", "converts", "from", "equatorial", "coords", "to", "galactic", "coords", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/coordutils.py#L763-L794
[ "def", "equatorial_to_galactic", "(", "ra", ",", "decl", ",", "equinox", "=", "'J2000'", ")", ":", "# convert the ra/decl to gl, gb", "radecl", "=", "SkyCoord", "(", "ra", "=", "ra", "*", "u", ".", "degree", ",", "dec", "=", "decl", "*", "u", ".", "degre...
2922a14619d183fb28005fa7d02027ac436f2265
valid
galactic_to_equatorial
This converts from galactic coords to equatorial coordinates. Parameters ---------- gl : float or array-like Galactic longitude values(s) in decimal degrees. gb : float or array-like Galactic latitude value(s) in decimal degrees. Returns ------- tuple of (float, float) o...
astrobase/coordutils.py
def galactic_to_equatorial(gl, gb): '''This converts from galactic coords to equatorial coordinates. Parameters ---------- gl : float or array-like Galactic longitude values(s) in decimal degrees. gb : float or array-like Galactic latitude value(s) in decimal degrees. Returns...
def galactic_to_equatorial(gl, gb): '''This converts from galactic coords to equatorial coordinates. Parameters ---------- gl : float or array-like Galactic longitude values(s) in decimal degrees. gb : float or array-like Galactic latitude value(s) in decimal degrees. Returns...
[ "This", "converts", "from", "galactic", "coords", "to", "equatorial", "coordinates", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/coordutils.py#L798-L823
[ "def", "galactic_to_equatorial", "(", "gl", ",", "gb", ")", ":", "gal", "=", "SkyCoord", "(", "gl", "*", "u", ".", "degree", ",", "gl", "*", "u", ".", "degree", ",", "frame", "=", "'galactic'", ")", "transformed", "=", "gal", ".", "transform_to", "("...
2922a14619d183fb28005fa7d02027ac436f2265
valid
xieta_from_radecl
This returns the image-plane projected xi-eta coords for inra, indecl. Parameters ---------- inra,indecl : array-like The equatorial coordinates to get the xi, eta coordinates for in decimal degrees or radians. incenterra,incenterdecl : float The center coordinate values to us...
astrobase/coordutils.py
def xieta_from_radecl(inra, indecl, incenterra, incenterdecl, deg=True): '''This returns the image-plane projected xi-eta coords for inra, indecl. Parameters ---------- inra,indecl : array-like The equatorial coordinates to get the xi, eta coordinate...
def xieta_from_radecl(inra, indecl, incenterra, incenterdecl, deg=True): '''This returns the image-plane projected xi-eta coords for inra, indecl. Parameters ---------- inra,indecl : array-like The equatorial coordinates to get the xi, eta coordinate...
[ "This", "returns", "the", "image", "-", "plane", "projected", "xi", "-", "eta", "coords", "for", "inra", "indecl", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/coordutils.py#L831-L906
[ "def", "xieta_from_radecl", "(", "inra", ",", "indecl", ",", "incenterra", ",", "incenterdecl", ",", "deg", "=", "True", ")", ":", "if", "deg", ":", "ra", "=", "np", ".", "radians", "(", "inra", ")", "decl", "=", "np", ".", "radians", "(", "indecl", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
generate_transit_lightcurve
This generates fake planet transit light curves. Parameters ---------- times : np.array This is an array of time values that will be used as the time base. mags,errs : np.array These arrays will have the model added to them. If either is None, `np.full_like(times, 0.0)` will u...
astrobase/fakelcs/generation.py
def generate_transit_lightcurve( times, mags=None, errs=None, paramdists={'transitperiod':sps.uniform(loc=0.1,scale=49.9), 'transitdepth':sps.uniform(loc=1.0e-4,scale=2.0e-2), 'transitduration':sps.uniform(loc=0.01,scale=0.29)}, magsareflux...
def generate_transit_lightcurve( times, mags=None, errs=None, paramdists={'transitperiod':sps.uniform(loc=0.1,scale=49.9), 'transitdepth':sps.uniform(loc=1.0e-4,scale=2.0e-2), 'transitduration':sps.uniform(loc=0.01,scale=0.29)}, magsareflux...
[ "This", "generates", "fake", "planet", "transit", "light", "curves", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/fakelcs/generation.py#L141-L269
[ "def", "generate_transit_lightcurve", "(", "times", ",", "mags", "=", "None", ",", "errs", "=", "None", ",", "paramdists", "=", "{", "'transitperiod'", ":", "sps", ".", "uniform", "(", "loc", "=", "0.1", ",", "scale", "=", "49.9", ")", ",", "'transitdept...
2922a14619d183fb28005fa7d02027ac436f2265
valid
generate_eb_lightcurve
This generates fake EB light curves. Parameters ---------- times : np.array This is an array of time values that will be used as the time base. mags,errs : np.array These arrays will have the model added to them. If either is None, `np.full_like(times, 0.0)` will used as a sub...
astrobase/fakelcs/generation.py
def generate_eb_lightcurve( times, mags=None, errs=None, paramdists={'period':sps.uniform(loc=0.2,scale=99.8), 'pdepth':sps.uniform(loc=1.0e-4,scale=0.7), 'pduration':sps.uniform(loc=0.01,scale=0.44), 'depthratio':sps.uniform(lo...
def generate_eb_lightcurve( times, mags=None, errs=None, paramdists={'period':sps.uniform(loc=0.2,scale=99.8), 'pdepth':sps.uniform(loc=1.0e-4,scale=0.7), 'pduration':sps.uniform(loc=0.01,scale=0.44), 'depthratio':sps.uniform(lo...
[ "This", "generates", "fake", "EB", "light", "curves", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/fakelcs/generation.py#L273-L396
[ "def", "generate_eb_lightcurve", "(", "times", ",", "mags", "=", "None", ",", "errs", "=", "None", ",", "paramdists", "=", "{", "'period'", ":", "sps", ".", "uniform", "(", "loc", "=", "0.2", ",", "scale", "=", "99.8", ")", ",", "'pdepth'", ":", "sps...
2922a14619d183fb28005fa7d02027ac436f2265
valid
generate_flare_lightcurve
This generates fake flare light curves. Parameters ---------- times : np.array This is an array of time values that will be used as the time base. mags,errs : np.array These arrays will have the model added to them. If either is None, `np.full_like(times, 0.0)` will used as a ...
astrobase/fakelcs/generation.py
def generate_flare_lightcurve( times, mags=None, errs=None, paramdists={ # flare peak amplitude from 0.01 mag to 1.0 mag above median. this # is tuned for redder bands, flares are much stronger in bluer # bands, so tune appropriately for your situatio...
def generate_flare_lightcurve( times, mags=None, errs=None, paramdists={ # flare peak amplitude from 0.01 mag to 1.0 mag above median. this # is tuned for redder bands, flares are much stronger in bluer # bands, so tune appropriately for your situatio...
[ "This", "generates", "fake", "flare", "light", "curves", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/fakelcs/generation.py#L400-L541
[ "def", "generate_flare_lightcurve", "(", "times", ",", "mags", "=", "None", ",", "errs", "=", "None", ",", "paramdists", "=", "{", "# flare peak amplitude from 0.01 mag to 1.0 mag above median. this", "# is tuned for redder bands, flares are much stronger in bluer", "# bands, so...
2922a14619d183fb28005fa7d02027ac436f2265
valid
generate_sinusoidal_lightcurve
This generates fake sinusoidal light curves. This can be used for a variety of sinusoidal variables, e.g. RRab, RRc, Cepheids, Miras, etc. The functions that generate these model LCs below implement the following table:: ## FOURIER PARAMS FOR SINUSOIDAL VARIABLES # # type fo...
astrobase/fakelcs/generation.py
def generate_sinusoidal_lightcurve( times, mags=None, errs=None, paramdists={ 'period':sps.uniform(loc=0.04,scale=500.0), 'fourierorder':[2,10], 'amplitude':sps.uniform(loc=0.1,scale=0.9), 'phioffset':0.0, }, magsarefluxes=F...
def generate_sinusoidal_lightcurve( times, mags=None, errs=None, paramdists={ 'period':sps.uniform(loc=0.04,scale=500.0), 'fourierorder':[2,10], 'amplitude':sps.uniform(loc=0.1,scale=0.9), 'phioffset':0.0, }, magsarefluxes=F...
[ "This", "generates", "fake", "sinusoidal", "light", "curves", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/fakelcs/generation.py#L545-L698
[ "def", "generate_sinusoidal_lightcurve", "(", "times", ",", "mags", "=", "None", ",", "errs", "=", "None", ",", "paramdists", "=", "{", "'period'", ":", "sps", ".", "uniform", "(", "loc", "=", "0.04", ",", "scale", "=", "500.0", ")", ",", "'fourierorder'...
2922a14619d183fb28005fa7d02027ac436f2265
valid
generate_rrab_lightcurve
This generates fake RRab light curves. Parameters ---------- times : np.array This is an array of time values that will be used as the time base. mags,errs : np.array These arrays will have the model added to them. If either is None, `np.full_like(times, 0.0)` will used as a s...
astrobase/fakelcs/generation.py
def generate_rrab_lightcurve( times, mags=None, errs=None, paramdists={ 'period':sps.uniform(loc=0.45,scale=0.35), 'fourierorder':[8,11], 'amplitude':sps.uniform(loc=0.4,scale=0.5), 'phioffset':np.pi, }, magsarefluxes=False ...
def generate_rrab_lightcurve( times, mags=None, errs=None, paramdists={ 'period':sps.uniform(loc=0.45,scale=0.35), 'fourierorder':[8,11], 'amplitude':sps.uniform(loc=0.4,scale=0.5), 'phioffset':np.pi, }, magsarefluxes=False ...
[ "This", "generates", "fake", "RRab", "light", "curves", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/fakelcs/generation.py#L702-L775
[ "def", "generate_rrab_lightcurve", "(", "times", ",", "mags", "=", "None", ",", "errs", "=", "None", ",", "paramdists", "=", "{", "'period'", ":", "sps", ".", "uniform", "(", "loc", "=", "0.45", ",", "scale", "=", "0.35", ")", ",", "'fourierorder'", ":...
2922a14619d183fb28005fa7d02027ac436f2265
valid
make_fakelc
This preprocesses an input real LC and sets it up to be a fake LC. Parameters ---------- lcfile : str This is an input light curve file that will be used to copy over the time-base. This will be used to generate the time-base for fake light curves to provide a realistic simulation ...
astrobase/fakelcs/generation.py
def make_fakelc(lcfile, outdir, magrms=None, randomizemags=True, randomizecoords=False, lcformat='hat-sql', lcformatdir=None, timecols=None, magcols=None, errcols=None): ''...
def make_fakelc(lcfile, outdir, magrms=None, randomizemags=True, randomizecoords=False, lcformat='hat-sql', lcformatdir=None, timecols=None, magcols=None, errcols=None): ''...
[ "This", "preprocesses", "an", "input", "real", "LC", "and", "sets", "it", "up", "to", "be", "a", "fake", "LC", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/fakelcs/generation.py#L1181-L1623
[ "def", "make_fakelc", "(", "lcfile", ",", "outdir", ",", "magrms", "=", "None", ",", "randomizemags", "=", "True", ",", "randomizecoords", "=", "False", ",", "lcformat", "=", "'hat-sql'", ",", "lcformatdir", "=", "None", ",", "timecols", "=", "None", ",", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
collection_worker
This wraps `process_fakelc` for `make_fakelc_collection` below. Parameters ---------- task : tuple This is of the form:: task[0] = lcfile task[1] = outdir task[2] = magrms task[3] = dict with keys: {'lcformat', 'timecols', 'magcols', ...
astrobase/fakelcs/generation.py
def collection_worker(task): ''' This wraps `process_fakelc` for `make_fakelc_collection` below. Parameters ---------- task : tuple This is of the form:: task[0] = lcfile task[1] = outdir task[2] = magrms task[3] = dict with keys: {'lcformat...
def collection_worker(task): ''' This wraps `process_fakelc` for `make_fakelc_collection` below. Parameters ---------- task : tuple This is of the form:: task[0] = lcfile task[1] = outdir task[2] = magrms task[3] = dict with keys: {'lcformat...
[ "This", "wraps", "process_fakelc", "for", "make_fakelc_collection", "below", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/fakelcs/generation.py#L1633-L1676
[ "def", "collection_worker", "(", "task", ")", ":", "lcfile", ",", "outdir", ",", "kwargs", "=", "task", "try", ":", "fakelcresults", "=", "make_fakelc", "(", "lcfile", ",", "outdir", ",", "*", "*", "kwargs", ")", "return", "fakelcresults", "except", "Excep...
2922a14619d183fb28005fa7d02027ac436f2265
valid
make_fakelc_collection
This prepares light curves for the recovery sim. Collects light curves from `lclist` using a uniform sampling among them. Copies them to the `simbasedir`, zeroes out their mags and errs but keeps their time bases, also keeps their RMS and median mags for later use. Calculates the mag-rms relation for t...
astrobase/fakelcs/generation.py
def make_fakelc_collection(lclist, simbasedir, magrmsfrom, magrms_interpolate='quadratic', magrms_fillvalue='extrapolate', maxlcs=25000, maxvars=2000, ...
def make_fakelc_collection(lclist, simbasedir, magrmsfrom, magrms_interpolate='quadratic', magrms_fillvalue='extrapolate', maxlcs=25000, maxvars=2000, ...
[ "This", "prepares", "light", "curves", "for", "the", "recovery", "sim", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/fakelcs/generation.py#L1680-L2008
[ "def", "make_fakelc_collection", "(", "lclist", ",", "simbasedir", ",", "magrmsfrom", ",", "magrms_interpolate", "=", "'quadratic'", ",", "magrms_fillvalue", "=", "'extrapolate'", ",", "maxlcs", "=", "25000", ",", "maxvars", "=", "2000", ",", "randomizemags", "=",...
2922a14619d183fb28005fa7d02027ac436f2265
valid
add_fakelc_variability
This adds variability of the specified type to the fake LC. The procedure is (for each `magcol`): - read the fakelcfile, get the stored moments and vartype info - add the periodic variability specified in vartype and varparamdists. if `vartype == None`, then do nothing in this step. If `override_va...
astrobase/fakelcs/generation.py
def add_fakelc_variability(fakelcfile, vartype, override_paramdists=None, magsarefluxes=False, overwrite=False): '''This adds variability of the specified type to the fake LC. The procedure is (for each ...
def add_fakelc_variability(fakelcfile, vartype, override_paramdists=None, magsarefluxes=False, overwrite=False): '''This adds variability of the specified type to the fake LC. The procedure is (for each ...
[ "This", "adds", "variability", "of", "the", "specified", "type", "to", "the", "fake", "LC", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/fakelcs/generation.py#L2016-L2207
[ "def", "add_fakelc_variability", "(", "fakelcfile", ",", "vartype", ",", "override_paramdists", "=", "None", ",", "magsarefluxes", "=", "False", ",", "overwrite", "=", "False", ")", ":", "# read in the fakelcfile", "lcdict", "=", "_read_pklc", "(", "fakelcfile", "...
2922a14619d183fb28005fa7d02027ac436f2265
valid
add_variability_to_fakelc_collection
This adds variability and noise to all fake LCs in `simbasedir`. If an object is marked as variable in the `fakelcs-info`.pkl file in `simbasedir`, a variable signal will be added to its light curve based on its selected type, default period and amplitude distribution, the appropriate params, etc. the ...
astrobase/fakelcs/generation.py
def add_variability_to_fakelc_collection(simbasedir, override_paramdists=None, overwrite_existingvar=False): '''This adds variability and noise to all fake LCs in `simbasedir`. If an object is marked as variable in the `fakelcs-i...
def add_variability_to_fakelc_collection(simbasedir, override_paramdists=None, overwrite_existingvar=False): '''This adds variability and noise to all fake LCs in `simbasedir`. If an object is marked as variable in the `fakelcs-i...
[ "This", "adds", "variability", "and", "noise", "to", "all", "fake", "LCs", "in", "simbasedir", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/fakelcs/generation.py#L2211-L2331
[ "def", "add_variability_to_fakelc_collection", "(", "simbasedir", ",", "override_paramdists", "=", "None", ",", "overwrite_existingvar", "=", "False", ")", ":", "# open the fakelcs-info.pkl", "infof", "=", "os", ".", "path", ".", "join", "(", "simbasedir", ",", "'fa...
2922a14619d183fb28005fa7d02027ac436f2265
valid
add_flare_model
This adds a flare model function to the input magnitude/flux time-series. Parameters ---------- flareparams : list of float This defines the flare model:: [amplitude, flare_peak_time, rise_gaussian_stdev, decay_time_constant] where: ...
astrobase/varbase/flares.py
def add_flare_model(flareparams, times, mags, errs): '''This adds a flare model function to the input magnitude/flux time-series. Parameters ---------- flareparams : list of float This defines the flare model:: [amplitude...
def add_flare_model(flareparams, times, mags, errs): '''This adds a flare model function to the input magnitude/flux time-series. Parameters ---------- flareparams : list of float This defines the flare model:: [amplitude...
[ "This", "adds", "a", "flare", "model", "function", "to", "the", "input", "magnitude", "/", "flux", "time", "-", "series", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/varbase/flares.py#L53-L115
[ "def", "add_flare_model", "(", "flareparams", ",", "times", ",", "mags", ",", "errs", ")", ":", "modelmags", ",", "ftimes", ",", "fmags", ",", "ferrs", "=", "flares", ".", "flare_model", "(", "flareparams", ",", "times", ",", "mags", ",", "errs", ")", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
simple_flare_find
This finds flares in time series using the method in Walkowicz+ 2011. FIXME: finish this. Parameters ---------- times,mags,errs : np.array The input time-series to find flares in. smoothbinsize : int The number of consecutive light curve points to smooth over in the time ...
astrobase/varbase/flares.py
def simple_flare_find(times, mags, errs, smoothbinsize=97, flare_minsigma=4.0, flare_maxcadencediff=1, flare_mincadencepoints=3, magsarefluxes=False, savgol_polyorder=2, ...
def simple_flare_find(times, mags, errs, smoothbinsize=97, flare_minsigma=4.0, flare_maxcadencediff=1, flare_mincadencepoints=3, magsarefluxes=False, savgol_polyorder=2, ...
[ "This", "finds", "flares", "in", "time", "series", "using", "the", "method", "in", "Walkowicz", "+", "2011", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/varbase/flares.py#L123-L219
[ "def", "simple_flare_find", "(", "times", ",", "mags", ",", "errs", ",", "smoothbinsize", "=", "97", ",", "flare_minsigma", "=", "4.0", ",", "flare_maxcadencediff", "=", "1", ",", "flare_mincadencepoints", "=", "3", ",", "magsarefluxes", "=", "False", ",", "...
2922a14619d183fb28005fa7d02027ac436f2265
valid
_smooth_acf
This returns a smoothed version of the ACF. Convolves the ACF with a Gaussian of given `windowsize` and `windowfwhm`. Parameters ---------- acf : np.array The auto-correlation function array to smooth. windowfwhm : int The smoothing window Gaussian kernel's FWHM . windowsize...
astrobase/periodbase/macf.py
def _smooth_acf(acf, windowfwhm=7, windowsize=21): '''This returns a smoothed version of the ACF. Convolves the ACF with a Gaussian of given `windowsize` and `windowfwhm`. Parameters ---------- acf : np.array The auto-correlation function array to smooth. windowfwhm : int The...
def _smooth_acf(acf, windowfwhm=7, windowsize=21): '''This returns a smoothed version of the ACF. Convolves the ACF with a Gaussian of given `windowsize` and `windowfwhm`. Parameters ---------- acf : np.array The auto-correlation function array to smooth. windowfwhm : int The...
[ "This", "returns", "a", "smoothed", "version", "of", "the", "ACF", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/periodbase/macf.py#L65-L93
[ "def", "_smooth_acf", "(", "acf", ",", "windowfwhm", "=", "7", ",", "windowsize", "=", "21", ")", ":", "convkernel", "=", "Gaussian1DKernel", "(", "windowfwhm", ",", "x_size", "=", "windowsize", ")", "smoothed", "=", "convolve", "(", "acf", ",", "convkerne...
2922a14619d183fb28005fa7d02027ac436f2265
valid
_smooth_acf_savgol
This returns a smoothed version of the ACF. This version uses the Savitsky-Golay smoothing filter. Parameters ---------- acf : np.array The auto-correlation function array to smooth. windowsize : int The number of input points to apply the smoothing over. polyorder : int ...
astrobase/periodbase/macf.py
def _smooth_acf_savgol(acf, windowsize=21, polyorder=2): ''' This returns a smoothed version of the ACF. This version uses the Savitsky-Golay smoothing filter. Parameters ---------- acf : np.array The auto-correlation function array to smooth. windowsize : int The number ...
def _smooth_acf_savgol(acf, windowsize=21, polyorder=2): ''' This returns a smoothed version of the ACF. This version uses the Savitsky-Golay smoothing filter. Parameters ---------- acf : np.array The auto-correlation function array to smooth. windowsize : int The number ...
[ "This", "returns", "a", "smoothed", "version", "of", "the", "ACF", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/periodbase/macf.py#L96-L124
[ "def", "_smooth_acf_savgol", "(", "acf", ",", "windowsize", "=", "21", ",", "polyorder", "=", "2", ")", ":", "smoothed", "=", "savgol_filter", "(", "acf", ",", "windowsize", ",", "polyorder", ")", "return", "smoothed" ]
2922a14619d183fb28005fa7d02027ac436f2265
valid
_get_acf_peakheights
This calculates the relative peak heights for first npeaks in ACF. Usually, the first peak or the second peak (if its peak height > first peak) corresponds to the correct lag. When we know the correct lag, the period is then:: bestperiod = time[lags == bestlag] - time[0] Parameters ------...
astrobase/periodbase/macf.py
def _get_acf_peakheights(lags, acf, npeaks=20, searchinterval=1): '''This calculates the relative peak heights for first npeaks in ACF. Usually, the first peak or the second peak (if its peak height > first peak) corresponds to the correct lag. When we know the correct lag, the period is then:: ...
def _get_acf_peakheights(lags, acf, npeaks=20, searchinterval=1): '''This calculates the relative peak heights for first npeaks in ACF. Usually, the first peak or the second peak (if its peak height > first peak) corresponds to the correct lag. When we know the correct lag, the period is then:: ...
[ "This", "calculates", "the", "relative", "peak", "heights", "for", "first", "npeaks", "in", "ACF", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/periodbase/macf.py#L128-L224
[ "def", "_get_acf_peakheights", "(", "lags", ",", "acf", ",", "npeaks", "=", "20", ",", "searchinterval", "=", "1", ")", ":", "maxinds", "=", "argrelmax", "(", "acf", ",", "order", "=", "searchinterval", ")", "[", "0", "]", "maxacfs", "=", "acf", "[", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
plot_acf_results
This plots the unsmoothed/smoothed ACF vs lag. Parameters ---------- acfp : dict This is the dict returned from `macf_period_find` below. outfile : str The output file the plot will be written to. maxlags: int The maximum number of lags to include in the plot. yrange...
astrobase/periodbase/macf.py
def plot_acf_results(acfp, outfile, maxlags=5000, yrange=(-0.4,0.4)): ''' This plots the unsmoothed/smoothed ACF vs lag. Parameters ---------- acfp : dict This is the dict returned from `macf_period_find` below. outfile : str The output file the plot will be written to. m...
def plot_acf_results(acfp, outfile, maxlags=5000, yrange=(-0.4,0.4)): ''' This plots the unsmoothed/smoothed ACF vs lag. Parameters ---------- acfp : dict This is the dict returned from `macf_period_find` below. outfile : str The output file the plot will be written to. m...
[ "This", "plots", "the", "unsmoothed", "/", "smoothed", "ACF", "vs", "lag", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/periodbase/macf.py#L227-L292
[ "def", "plot_acf_results", "(", "acfp", ",", "outfile", ",", "maxlags", "=", "5000", ",", "yrange", "=", "(", "-", "0.4", ",", "0.4", ")", ")", ":", "import", "matplotlib", ".", "pyplot", "as", "plt", "lags", "=", "acfp", "[", "'acfresults'", "]", "[...
2922a14619d183fb28005fa7d02027ac436f2265
valid
macf_period_find
This finds periods using the McQuillan+ (2013a, 2014) ACF method. The kwargs from `periodepsilon` to `stepsize` don't do anything but are used to present a consistent API for all periodbase period-finders to an outside driver (e.g. the one in the checkplotserver). Parameters ---------- times,...
astrobase/periodbase/macf.py
def macf_period_find( times, mags, errs, fillgaps=0.0, filterwindow=11, forcetimebin=None, maxlags=None, maxacfpeaks=10, smoothacf=21, # set for Kepler-type LCs, see details below smoothfunc=_smooth_acf_savgol, smoothfunckwargs=Non...
def macf_period_find( times, mags, errs, fillgaps=0.0, filterwindow=11, forcetimebin=None, maxlags=None, maxacfpeaks=10, smoothacf=21, # set for Kepler-type LCs, see details below smoothfunc=_smooth_acf_savgol, smoothfunckwargs=Non...
[ "This", "finds", "periods", "using", "the", "McQuillan", "+", "(", "2013a", "2014", ")", "ACF", "method", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/periodbase/macf.py#L300-L547
[ "def", "macf_period_find", "(", "times", ",", "mags", ",", "errs", ",", "fillgaps", "=", "0.0", ",", "filterwindow", "=", "11", ",", "forcetimebin", "=", "None", ",", "maxlags", "=", "None", ",", "maxacfpeaks", "=", "10", ",", "smoothacf", "=", "21", "...
2922a14619d183fb28005fa7d02027ac436f2265
valid
_autocorr_func1
Calculates the autocorr of mag series for specific lag. This version of the function is taken from: Kim et al. (`2011 <https://dx.doi.org/10.1088/0004-637X/735/2/68>`_) Parameters ---------- mags : np.array This is the magnitudes array. MUST NOT have any nans. lag : float The...
astrobase/varbase/autocorr.py
def _autocorr_func1(mags, lag, maglen, magmed, magstd): '''Calculates the autocorr of mag series for specific lag. This version of the function is taken from: Kim et al. (`2011 <https://dx.doi.org/10.1088/0004-637X/735/2/68>`_) Parameters ---------- mags : np.array This is the magnitu...
def _autocorr_func1(mags, lag, maglen, magmed, magstd): '''Calculates the autocorr of mag series for specific lag. This version of the function is taken from: Kim et al. (`2011 <https://dx.doi.org/10.1088/0004-637X/735/2/68>`_) Parameters ---------- mags : np.array This is the magnitu...
[ "Calculates", "the", "autocorr", "of", "mag", "series", "for", "specific", "lag", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/varbase/autocorr.py#L20-L57
[ "def", "_autocorr_func1", "(", "mags", ",", "lag", ",", "maglen", ",", "magmed", ",", "magstd", ")", ":", "lagindex", "=", "nparange", "(", "1", ",", "maglen", "-", "lag", ")", "products", "=", "(", "mags", "[", "lagindex", "]", "-", "magmed", ")", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
_autocorr_func2
This is an alternative function to calculate the autocorrelation. This version is from (first definition): https://en.wikipedia.org/wiki/Correlogram#Estimation_of_autocorrelations Parameters ---------- mags : np.array This is the magnitudes array. MUST NOT have any nans. lag : float...
astrobase/varbase/autocorr.py
def _autocorr_func2(mags, lag, maglen, magmed, magstd): ''' This is an alternative function to calculate the autocorrelation. This version is from (first definition): https://en.wikipedia.org/wiki/Correlogram#Estimation_of_autocorrelations Parameters ---------- mags : np.array Th...
def _autocorr_func2(mags, lag, maglen, magmed, magstd): ''' This is an alternative function to calculate the autocorrelation. This version is from (first definition): https://en.wikipedia.org/wiki/Correlogram#Estimation_of_autocorrelations Parameters ---------- mags : np.array Th...
[ "This", "is", "an", "alternative", "function", "to", "calculate", "the", "autocorrelation", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/varbase/autocorr.py#L61-L106
[ "def", "_autocorr_func2", "(", "mags", ",", "lag", ",", "maglen", ",", "magmed", ",", "magstd", ")", ":", "lagindex", "=", "nparange", "(", "0", ",", "maglen", "-", "lag", ")", "products", "=", "(", "mags", "[", "lagindex", "]", "-", "magmed", ")", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
_autocorr_func3
This is yet another alternative to calculate the autocorrelation. Taken from: `Bayesian Methods for Hackers by Cameron Pilon <http://nbviewer.jupyter.org/github/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/blob/master/Chapter3_MCMC/Chapter3.ipynb#Autocorrelation>`_ (This should ...
astrobase/varbase/autocorr.py
def _autocorr_func3(mags, lag, maglen, magmed, magstd): ''' This is yet another alternative to calculate the autocorrelation. Taken from: `Bayesian Methods for Hackers by Cameron Pilon <http://nbviewer.jupyter.org/github/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/blob/maste...
def _autocorr_func3(mags, lag, maglen, magmed, magstd): ''' This is yet another alternative to calculate the autocorrelation. Taken from: `Bayesian Methods for Hackers by Cameron Pilon <http://nbviewer.jupyter.org/github/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/blob/maste...
[ "This", "is", "yet", "another", "alternative", "to", "calculate", "the", "autocorrelation", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/varbase/autocorr.py#L110-L149
[ "def", "_autocorr_func3", "(", "mags", ",", "lag", ",", "maglen", ",", "magmed", ",", "magstd", ")", ":", "# from http://tinyurl.com/afz57c4", "result", "=", "npcorrelate", "(", "mags", ",", "mags", ",", "mode", "=", "'full'", ")", "result", "=", "result", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
autocorr_magseries
This calculates the ACF of a light curve. This will pre-process the light curve to fill in all the gaps and normalize everything to zero. If `fillgaps = 'noiselevel'`, fills the gaps with the noise level obtained via the procedure above. If `fillgaps = 'nan'`, fills the gaps with `np.nan`. Paramet...
astrobase/varbase/autocorr.py
def autocorr_magseries(times, mags, errs, maxlags=1000, func=_autocorr_func3, fillgaps=0.0, filterwindow=11, forcetimebin=None, sigclip=3.0, magsarefluxes=Fals...
def autocorr_magseries(times, mags, errs, maxlags=1000, func=_autocorr_func3, fillgaps=0.0, filterwindow=11, forcetimebin=None, sigclip=3.0, magsarefluxes=Fals...
[ "This", "calculates", "the", "ACF", "of", "a", "light", "curve", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/varbase/autocorr.py#L153-L280
[ "def", "autocorr_magseries", "(", "times", ",", "mags", ",", "errs", ",", "maxlags", "=", "1000", ",", "func", "=", "_autocorr_func3", ",", "fillgaps", "=", "0.0", ",", "filterwindow", "=", "11", ",", "forcetimebin", "=", "None", ",", "sigclip", "=", "3....
2922a14619d183fb28005fa7d02027ac436f2265
valid
aovhm_theta
This calculates the harmonic AoV theta statistic for a frequency. This is a mostly faithful translation of the inner loop in `aovper.f90`. See the following for details: - http://users.camk.edu.pl/alex/ - Schwarzenberg-Czerny (`1996 <http://iopscience.iop.org/article/10.1086/309985/meta>`_) ...
astrobase/periodbase/smav.py
def aovhm_theta(times, mags, errs, frequency, nharmonics, magvariance): '''This calculates the harmonic AoV theta statistic for a frequency. This is a mostly faithful translation of the inner loop in `aovper.f90`. See the following for details: - http://users.camk.edu.pl/alex/ - Sc...
def aovhm_theta(times, mags, errs, frequency, nharmonics, magvariance): '''This calculates the harmonic AoV theta statistic for a frequency. This is a mostly faithful translation of the inner loop in `aovper.f90`. See the following for details: - http://users.camk.edu.pl/alex/ - Sc...
[ "This", "calculates", "the", "harmonic", "AoV", "theta", "statistic", "for", "a", "frequency", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/periodbase/smav.py#L73-L198
[ "def", "aovhm_theta", "(", "times", ",", "mags", ",", "errs", ",", "frequency", ",", "nharmonics", ",", "magvariance", ")", ":", "period", "=", "1.0", "/", "frequency", "ndet", "=", "times", ".", "size", "two_nharmonics", "=", "nharmonics", "+", "nharmonic...
2922a14619d183fb28005fa7d02027ac436f2265
valid
_aovhm_theta_worker
This is a parallel worker for the function below. Parameters ---------- tasks : tuple This is of the form below:: task[0] = times task[1] = mags task[2] = errs task[3] = frequency task[4] = nharmonics task[5] = magvariance ...
astrobase/periodbase/smav.py
def _aovhm_theta_worker(task): ''' This is a parallel worker for the function below. Parameters ---------- tasks : tuple This is of the form below:: task[0] = times task[1] = mags task[2] = errs task[3] = frequency task[4] = nhar...
def _aovhm_theta_worker(task): ''' This is a parallel worker for the function below. Parameters ---------- tasks : tuple This is of the form below:: task[0] = times task[1] = mags task[2] = errs task[3] = frequency task[4] = nhar...
[ "This", "is", "a", "parallel", "worker", "for", "the", "function", "below", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/periodbase/smav.py#L202-L239
[ "def", "_aovhm_theta_worker", "(", "task", ")", ":", "times", ",", "mags", ",", "errs", ",", "frequency", ",", "nharmonics", ",", "magvariance", "=", "task", "try", ":", "theta", "=", "aovhm_theta", "(", "times", ",", "mags", ",", "errs", ",", "frequency...
2922a14619d183fb28005fa7d02027ac436f2265
valid
LCDB.open
This opens a new database connection. Parameters ---------- database : str Name of the database to connect to. user : str User name of the database server user. password : str Password for the database server user. host : str ...
astrobase/lcdb.py
def open(self, database, user, password, host): '''This opens a new database connection. Parameters ---------- database : str Name of the database to connect to. user : str User name of the database server user. password : str Passw...
def open(self, database, user, password, host): '''This opens a new database connection. Parameters ---------- database : str Name of the database to connect to. user : str User name of the database server user. password : str Passw...
[ "This", "opens", "a", "new", "database", "connection", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcdb.py#L220-L261
[ "def", "open", "(", "self", ",", "database", ",", "user", ",", "password", ",", "host", ")", ":", "try", ":", "self", ".", "connection", "=", "pg", ".", "connect", "(", "user", "=", "user", ",", "password", "=", "password", ",", "database", "=", "d...
2922a14619d183fb28005fa7d02027ac436f2265
valid
LCDB.open_default
This opens the database connection using the default database parameters given in the ~/.astrobase/astrobase.conf file.
astrobase/lcdb.py
def open_default(self): ''' This opens the database connection using the default database parameters given in the ~/.astrobase/astrobase.conf file. ''' if HAVECONF: self.open(DBDATA, DBUSER, DBPASS, DBHOST) else: LOGERROR("no default DB connectio...
def open_default(self): ''' This opens the database connection using the default database parameters given in the ~/.astrobase/astrobase.conf file. ''' if HAVECONF: self.open(DBDATA, DBUSER, DBPASS, DBHOST) else: LOGERROR("no default DB connectio...
[ "This", "opens", "the", "database", "connection", "using", "the", "default", "database", "parameters", "given", "in", "the", "~", "/", ".", "astrobase", "/", "astrobase", ".", "conf", "file", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcdb.py#L265-L276
[ "def", "open_default", "(", "self", ")", ":", "if", "HAVECONF", ":", "self", ".", "open", "(", "DBDATA", ",", "DBUSER", ",", "DBPASS", ",", "DBHOST", ")", "else", ":", "LOGERROR", "(", "\"no default DB connection config found in lcdb.conf, \"", "\"this function wo...
2922a14619d183fb28005fa7d02027ac436f2265
valid
LCDB.autocommit
This sets the database connection to autocommit. Must be called before any cursors have been instantiated.
astrobase/lcdb.py
def autocommit(self): ''' This sets the database connection to autocommit. Must be called before any cursors have been instantiated. ''' if len(self.cursors.keys()) == 0: self.connection.autocommit = True else: raise AttributeError('database curs...
def autocommit(self): ''' This sets the database connection to autocommit. Must be called before any cursors have been instantiated. ''' if len(self.cursors.keys()) == 0: self.connection.autocommit = True else: raise AttributeError('database curs...
[ "This", "sets", "the", "database", "connection", "to", "autocommit", ".", "Must", "be", "called", "before", "any", "cursors", "have", "been", "instantiated", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcdb.py#L279-L290
[ "def", "autocommit", "(", "self", ")", ":", "if", "len", "(", "self", ".", "cursors", ".", "keys", "(", ")", ")", "==", "0", ":", "self", ".", "connection", ".", "autocommit", "=", "True", "else", ":", "raise", "AttributeError", "(", "'database cursors...
2922a14619d183fb28005fa7d02027ac436f2265
valid
LCDB.cursor
This gets or creates a DB cursor for the current DB connection. Parameters ---------- handle : str The name of the cursor to look up in the existing list or if it doesn't exist, the name to be used for a new cursor to be returned. dictcursor : bool ...
astrobase/lcdb.py
def cursor(self, handle, dictcursor=False): '''This gets or creates a DB cursor for the current DB connection. Parameters ---------- handle : str The name of the cursor to look up in the existing list or if it doesn't exist, the name to be used for a new cursor ...
def cursor(self, handle, dictcursor=False): '''This gets or creates a DB cursor for the current DB connection. Parameters ---------- handle : str The name of the cursor to look up in the existing list or if it doesn't exist, the name to be used for a new cursor ...
[ "This", "gets", "or", "creates", "a", "DB", "cursor", "for", "the", "current", "DB", "connection", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcdb.py#L293-L326
[ "def", "cursor", "(", "self", ",", "handle", ",", "dictcursor", "=", "False", ")", ":", "if", "handle", "in", "self", ".", "cursors", ":", "return", "self", ".", "cursors", "[", "handle", "]", "else", ":", "if", "dictcursor", ":", "self", ".", "curso...
2922a14619d183fb28005fa7d02027ac436f2265
valid
LCDB.newcursor
This creates a DB cursor for the current DB connection using a randomly generated handle. Returns a tuple with cursor and handle. Parameters ---------- dictcursor : bool If True, returns a cursor where each returned row can be addressed as a dictionary by column...
astrobase/lcdb.py
def newcursor(self, dictcursor=False): ''' This creates a DB cursor for the current DB connection using a randomly generated handle. Returns a tuple with cursor and handle. Parameters ---------- dictcursor : bool If True, returns a cursor where each returned...
def newcursor(self, dictcursor=False): ''' This creates a DB cursor for the current DB connection using a randomly generated handle. Returns a tuple with cursor and handle. Parameters ---------- dictcursor : bool If True, returns a cursor where each returned...
[ "This", "creates", "a", "DB", "cursor", "for", "the", "current", "DB", "connection", "using", "a", "randomly", "generated", "handle", ".", "Returns", "a", "tuple", "with", "cursor", "and", "handle", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcdb.py#L329-L358
[ "def", "newcursor", "(", "self", ",", "dictcursor", "=", "False", ")", ":", "handle", "=", "hashlib", ".", "sha256", "(", "os", ".", "urandom", "(", "12", ")", ")", ".", "hexdigest", "(", ")", "if", "dictcursor", ":", "self", ".", "cursors", "[", "...
2922a14619d183fb28005fa7d02027ac436f2265
valid
LCDB.commit
This just calls the connection's commit method.
astrobase/lcdb.py
def commit(self): ''' This just calls the connection's commit method. ''' if not self.connection.closed: self.connection.commit() else: raise AttributeError('postgres connection to %s is closed' % self.database)
def commit(self): ''' This just calls the connection's commit method. ''' if not self.connection.closed: self.connection.commit() else: raise AttributeError('postgres connection to %s is closed' % self.database)
[ "This", "just", "calls", "the", "connection", "s", "commit", "method", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcdb.py#L362-L371
[ "def", "commit", "(", "self", ")", ":", "if", "not", "self", ".", "connection", ".", "closed", ":", "self", ".", "connection", ".", "commit", "(", ")", "else", ":", "raise", "AttributeError", "(", "'postgres connection to %s is closed'", "%", "self", ".", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
LCDB.rollback
This just calls the connection's commit method.
astrobase/lcdb.py
def rollback(self): ''' This just calls the connection's commit method. ''' if not self.connection.closed: self.connection.rollback() else: raise AttributeError('postgres connection to %s is closed' % self.database)
def rollback(self): ''' This just calls the connection's commit method. ''' if not self.connection.closed: self.connection.rollback() else: raise AttributeError('postgres connection to %s is closed' % self.database)
[ "This", "just", "calls", "the", "connection", "s", "commit", "method", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcdb.py#L374-L383
[ "def", "rollback", "(", "self", ")", ":", "if", "not", "self", ".", "connection", ".", "closed", ":", "self", ".", "connection", ".", "rollback", "(", ")", "else", ":", "raise", "AttributeError", "(", "'postgres connection to %s is closed'", "%", "self", "."...
2922a14619d183fb28005fa7d02027ac436f2265
valid
LCDB.close_cursor
Closes the cursor specified and removes it from the `self.cursors` dictionary.
astrobase/lcdb.py
def close_cursor(self, handle): ''' Closes the cursor specified and removes it from the `self.cursors` dictionary. ''' if handle in self.cursors: self.cursors[handle].close() else: raise KeyError('cursor with handle %s was not found' % handle)
def close_cursor(self, handle): ''' Closes the cursor specified and removes it from the `self.cursors` dictionary. ''' if handle in self.cursors: self.cursors[handle].close() else: raise KeyError('cursor with handle %s was not found' % handle)
[ "Closes", "the", "cursor", "specified", "and", "removes", "it", "from", "the", "self", ".", "cursors", "dictionary", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcdb.py#L387-L397
[ "def", "close_cursor", "(", "self", ",", "handle", ")", ":", "if", "handle", "in", "self", ".", "cursors", ":", "self", ".", "cursors", "[", "handle", "]", ".", "close", "(", ")", "else", ":", "raise", "KeyError", "(", "'cursor with handle %s was not found...
2922a14619d183fb28005fa7d02027ac436f2265
valid
trapezoid_transit_func
This returns a trapezoid transit-shaped function. Suitable for first order modeling of transit signals. Parameters ---------- transitparams : list of float This contains the transiting planet trapezoid model:: transitparams = [transitperiod (time), tr...
astrobase/lcmodels/transits.py
def trapezoid_transit_func(transitparams, times, mags, errs, get_ntransitpoints=False): '''This returns a trapezoid transit-shaped function. Suitable for first order modeling of transit signals. Parameters ---------- transitparams : list of float This contains t...
def trapezoid_transit_func(transitparams, times, mags, errs, get_ntransitpoints=False): '''This returns a trapezoid transit-shaped function. Suitable for first order modeling of transit signals. Parameters ---------- transitparams : list of float This contains t...
[ "This", "returns", "a", "trapezoid", "transit", "-", "shaped", "function", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcmodels/transits.py#L18-L109
[ "def", "trapezoid_transit_func", "(", "transitparams", ",", "times", ",", "mags", ",", "errs", ",", "get_ntransitpoints", "=", "False", ")", ":", "(", "transitperiod", ",", "transitepoch", ",", "transitdepth", ",", "transitduration", ",", "ingressduration", ")", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
trapezoid_transit_residual
This returns the residual between the modelmags and the actual mags. Parameters ---------- transitparams : list of float This contains the transiting planet trapezoid model:: transitparams = [transitperiod (time), transitepoch (time), ...
astrobase/lcmodels/transits.py
def trapezoid_transit_residual(transitparams, times, mags, errs): ''' This returns the residual between the modelmags and the actual mags. Parameters ---------- transitparams : list of float This contains the transiting planet trapezoid model:: transitparams = [transitperiod (...
def trapezoid_transit_residual(transitparams, times, mags, errs): ''' This returns the residual between the modelmags and the actual mags. Parameters ---------- transitparams : list of float This contains the transiting planet trapezoid model:: transitparams = [transitperiod (...
[ "This", "returns", "the", "residual", "between", "the", "modelmags", "and", "the", "actual", "mags", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcmodels/transits.py#L113-L155
[ "def", "trapezoid_transit_residual", "(", "transitparams", ",", "times", ",", "mags", ",", "errs", ")", ":", "modelmags", ",", "phase", ",", "ptimes", ",", "pmags", ",", "perrs", "=", "(", "trapezoid_transit_func", "(", "transitparams", ",", "times", ",", "m...
2922a14619d183fb28005fa7d02027ac436f2265
valid
tap_query
This queries the SIMBAD TAP service using the ADQL query string provided. Parameters ---------- querystr : str This is the ADQL query string. See: http://www.ivoa.net/documents/ADQL/2.0 for the specification. simbad_mirror : str This is the key used to select a SIMBAD mirror f...
astrobase/services/simbad.py
def tap_query(querystr, simbad_mirror='simbad', returnformat='csv', forcefetch=False, cachedir='~/.astrobase/simbad-cache', verbose=True, timeout=10.0, refresh=2.0, maxtimeout=90.0, maxtries=3, ...
def tap_query(querystr, simbad_mirror='simbad', returnformat='csv', forcefetch=False, cachedir='~/.astrobase/simbad-cache', verbose=True, timeout=10.0, refresh=2.0, maxtimeout=90.0, maxtries=3, ...
[ "This", "queries", "the", "SIMBAD", "TAP", "service", "using", "the", "ADQL", "query", "string", "provided", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/services/simbad.py#L105-L857
[ "def", "tap_query", "(", "querystr", ",", "simbad_mirror", "=", "'simbad'", ",", "returnformat", "=", "'csv'", ",", "forcefetch", "=", "False", ",", "cachedir", "=", "'~/.astrobase/simbad-cache'", ",", "verbose", "=", "True", ",", "timeout", "=", "10.0", ",", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
objectnames_conesearch
This queries the SIMBAD TAP service for a list of object names near the coords. This is effectively a "reverse" name resolver (i.e. this does the opposite of SESAME). Parameters ---------- racenter,declcenter : float The cone-search center coordinates in decimal degrees searchradiusar...
astrobase/services/simbad.py
def objectnames_conesearch(racenter, declcenter, searchradiusarcsec, simbad_mirror='simbad', returnformat='csv', forcefetch=False, cachedir='~/.astrobase/simb...
def objectnames_conesearch(racenter, declcenter, searchradiusarcsec, simbad_mirror='simbad', returnformat='csv', forcefetch=False, cachedir='~/.astrobase/simb...
[ "This", "queries", "the", "SIMBAD", "TAP", "service", "for", "a", "list", "of", "object", "names", "near", "the", "coords", ".", "This", "is", "effectively", "a", "reverse", "name", "resolver", "(", "i", ".", "e", ".", "this", "does", "the", "opposite", ...
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/services/simbad.py#L861-L977
[ "def", "objectnames_conesearch", "(", "racenter", ",", "declcenter", ",", "searchradiusarcsec", ",", "simbad_mirror", "=", "'simbad'", ",", "returnformat", "=", "'csv'", ",", "forcefetch", "=", "False", ",", "cachedir", "=", "'~/.astrobase/simbad-cache'", ",", "verb...
2922a14619d183fb28005fa7d02027ac436f2265
valid
xmatch_cplist_external_catalogs
This xmatches external catalogs to a collection of checkplots. Parameters ---------- cplist : list of str This is the list of checkplot pickle files to process. xmatchpkl : str The filename of a pickle prepared beforehand with the `checkplot.pkl_xmatch.load_xmatch_external_cat...
astrobase/lcproc/checkplotproc.py
def xmatch_cplist_external_catalogs(cplist, xmatchpkl, xmatchradiusarcsec=2.0, updateexisting=True, resultstodir=None): '''This xmatches external catalogs to a collection o...
def xmatch_cplist_external_catalogs(cplist, xmatchpkl, xmatchradiusarcsec=2.0, updateexisting=True, resultstodir=None): '''This xmatches external catalogs to a collection o...
[ "This", "xmatches", "external", "catalogs", "to", "a", "collection", "of", "checkplots", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/checkplotproc.py#L95-L181
[ "def", "xmatch_cplist_external_catalogs", "(", "cplist", ",", "xmatchpkl", ",", "xmatchradiusarcsec", "=", "2.0", ",", "updateexisting", "=", "True", ",", "resultstodir", "=", "None", ")", ":", "# load the external catalog", "with", "open", "(", "xmatchpkl", ",", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
xmatch_cpdir_external_catalogs
This xmatches external catalogs to all checkplots in a directory. Parameters ----------- cpdir : str This is the directory to search in for checkplots. xmatchpkl : str The filename of a pickle prepared beforehand with the `checkplot.pkl_xmatch.load_xmatch_external_catalogs` fu...
astrobase/lcproc/checkplotproc.py
def xmatch_cpdir_external_catalogs(cpdir, xmatchpkl, cpfileglob='checkplot-*.pkl*', xmatchradiusarcsec=2.0, updateexisting=True, resultstodir=Non...
def xmatch_cpdir_external_catalogs(cpdir, xmatchpkl, cpfileglob='checkplot-*.pkl*', xmatchradiusarcsec=2.0, updateexisting=True, resultstodir=Non...
[ "This", "xmatches", "external", "catalogs", "to", "all", "checkplots", "in", "a", "directory", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/checkplotproc.py#L185-L238
[ "def", "xmatch_cpdir_external_catalogs", "(", "cpdir", ",", "xmatchpkl", ",", "cpfileglob", "=", "'checkplot-*.pkl*'", ",", "xmatchradiusarcsec", "=", "2.0", ",", "updateexisting", "=", "True", ",", "resultstodir", "=", "None", ")", ":", "cplist", "=", "glob", "...
2922a14619d183fb28005fa7d02027ac436f2265
valid
colormagdiagram_cplist
This makes color-mag diagrams for all checkplot pickles in the provided list. Can make an arbitrary number of CMDs given lists of x-axis colors and y-axis mags to use. Parameters ---------- cplist : list of str This is the list of checkplot pickles to process. outpkl : str ...
astrobase/lcproc/checkplotproc.py
def colormagdiagram_cplist(cplist, outpkl, color_mag1=['gaiamag','sdssg'], color_mag2=['kmag','kmag'], yaxis_mag=['gaia_absmag','rpmj']): '''This makes color-mag diagrams for all checkplot pickles in the prov...
def colormagdiagram_cplist(cplist, outpkl, color_mag1=['gaiamag','sdssg'], color_mag2=['kmag','kmag'], yaxis_mag=['gaia_absmag','rpmj']): '''This makes color-mag diagrams for all checkplot pickles in the prov...
[ "This", "makes", "color", "-", "mag", "diagrams", "for", "all", "checkplot", "pickles", "in", "the", "provided", "list", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/checkplotproc.py#L263-L373
[ "def", "colormagdiagram_cplist", "(", "cplist", ",", "outpkl", ",", "color_mag1", "=", "[", "'gaiamag'", ",", "'sdssg'", "]", ",", "color_mag2", "=", "[", "'kmag'", ",", "'kmag'", "]", ",", "yaxis_mag", "=", "[", "'gaia_absmag'", ",", "'rpmj'", "]", ")", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
colormagdiagram_cpdir
This makes CMDs for all checkplot pickles in the provided directory. Can make an arbitrary number of CMDs given lists of x-axis colors and y-axis mags to use. Parameters ---------- cpdir : list of str This is the directory to get the list of input checkplot pickles from. outpkl : str...
astrobase/lcproc/checkplotproc.py
def colormagdiagram_cpdir( cpdir, outpkl, cpfileglob='checkplot*.pkl*', color_mag1=['gaiamag','sdssg'], color_mag2=['kmag','kmag'], yaxis_mag=['gaia_absmag','rpmj'] ): '''This makes CMDs for all checkplot pickles in the provided directory. Can make an arbitrary n...
def colormagdiagram_cpdir( cpdir, outpkl, cpfileglob='checkplot*.pkl*', color_mag1=['gaiamag','sdssg'], color_mag2=['kmag','kmag'], yaxis_mag=['gaia_absmag','rpmj'] ): '''This makes CMDs for all checkplot pickles in the provided directory. Can make an arbitrary n...
[ "This", "makes", "CMDs", "for", "all", "checkplot", "pickles", "in", "the", "provided", "directory", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/checkplotproc.py#L377-L445
[ "def", "colormagdiagram_cpdir", "(", "cpdir", ",", "outpkl", ",", "cpfileglob", "=", "'checkplot*.pkl*'", ",", "color_mag1", "=", "[", "'gaiamag'", ",", "'sdssg'", "]", ",", "color_mag2", "=", "[", "'kmag'", ",", "'kmag'", "]", ",", "yaxis_mag", "=", "[", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
add_cmd_to_checkplot
This adds CMD figures to a checkplot dict or pickle. Looks up the CMDs in `cmdpkl`, adds the object from `cpx` as a gold(-ish) star in the plot, and then saves the figure to a base64 encoded PNG, which can then be read and used by the `checkplotserver`. Parameters ---------- cpx : str or dict...
astrobase/lcproc/checkplotproc.py
def add_cmd_to_checkplot( cpx, cmdpkl, require_cmd_magcolor=True, save_cmd_pngs=False ): '''This adds CMD figures to a checkplot dict or pickle. Looks up the CMDs in `cmdpkl`, adds the object from `cpx` as a gold(-ish) star in the plot, and then saves the figure to a base64 ...
def add_cmd_to_checkplot( cpx, cmdpkl, require_cmd_magcolor=True, save_cmd_pngs=False ): '''This adds CMD figures to a checkplot dict or pickle. Looks up the CMDs in `cmdpkl`, adds the object from `cpx` as a gold(-ish) star in the plot, and then saves the figure to a base64 ...
[ "This", "adds", "CMD", "figures", "to", "a", "checkplot", "dict", "or", "pickle", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/checkplotproc.py#L449-L624
[ "def", "add_cmd_to_checkplot", "(", "cpx", ",", "cmdpkl", ",", "require_cmd_magcolor", "=", "True", ",", "save_cmd_pngs", "=", "False", ")", ":", "# get the checkplot", "if", "isinstance", "(", "cpx", ",", "str", ")", "and", "os", ".", "path", ".", "exists",...
2922a14619d183fb28005fa7d02027ac436f2265
valid
add_cmds_cplist
This adds CMDs for each object in cplist. Parameters ---------- cplist : list of str This is the input list of checkplot pickles to add the CMDs to. cmdpkl : str This is the filename of the CMD pickle created previously. require_cmd_magcolor : bool If this is True, a CMD ...
astrobase/lcproc/checkplotproc.py
def add_cmds_cplist(cplist, cmdpkl, require_cmd_magcolor=True, save_cmd_pngs=False): '''This adds CMDs for each object in cplist. Parameters ---------- cplist : list of str This is the input list of checkplot pickles to add the CMDs to. cmdpkl : str...
def add_cmds_cplist(cplist, cmdpkl, require_cmd_magcolor=True, save_cmd_pngs=False): '''This adds CMDs for each object in cplist. Parameters ---------- cplist : list of str This is the input list of checkplot pickles to add the CMDs to. cmdpkl : str...
[ "This", "adds", "CMDs", "for", "each", "object", "in", "cplist", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/checkplotproc.py#L628-L668
[ "def", "add_cmds_cplist", "(", "cplist", ",", "cmdpkl", ",", "require_cmd_magcolor", "=", "True", ",", "save_cmd_pngs", "=", "False", ")", ":", "# load the CMD first to save on IO", "with", "open", "(", "cmdpkl", ",", "'rb'", ")", "as", "infd", ":", "cmd", "="...
2922a14619d183fb28005fa7d02027ac436f2265
valid
add_cmds_cpdir
This adds CMDs for each object in cpdir. Parameters ---------- cpdir : list of str This is the directory to search for checkplot pickles. cmdpkl : str This is the filename of the CMD pickle created previously. cpfileglob : str The UNIX fileglob to use when searching for c...
astrobase/lcproc/checkplotproc.py
def add_cmds_cpdir(cpdir, cmdpkl, cpfileglob='checkplot*.pkl*', require_cmd_magcolor=True, save_cmd_pngs=False): '''This adds CMDs for each object in cpdir. Parameters ---------- cpdir : list of str This is the directo...
def add_cmds_cpdir(cpdir, cmdpkl, cpfileglob='checkplot*.pkl*', require_cmd_magcolor=True, save_cmd_pngs=False): '''This adds CMDs for each object in cpdir. Parameters ---------- cpdir : list of str This is the directo...
[ "This", "adds", "CMDs", "for", "each", "object", "in", "cpdir", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/checkplotproc.py#L672-L714
[ "def", "add_cmds_cpdir", "(", "cpdir", ",", "cmdpkl", ",", "cpfileglob", "=", "'checkplot*.pkl*'", ",", "require_cmd_magcolor", "=", "True", ",", "save_cmd_pngs", "=", "False", ")", ":", "cplist", "=", "glob", ".", "glob", "(", "os", ".", "path", ".", "joi...
2922a14619d183fb28005fa7d02027ac436f2265
valid
cp_objectinfo_worker
This is a parallel worker for `parallel_update_cp_objectinfo`. Parameters ---------- task : tuple - task[0] = checkplot pickle file - task[1] = kwargs Returns ------- str The name of the checkplot file that was updated. None if the update fails for some reason...
astrobase/lcproc/checkplotproc.py
def cp_objectinfo_worker(task): '''This is a parallel worker for `parallel_update_cp_objectinfo`. Parameters ---------- task : tuple - task[0] = checkplot pickle file - task[1] = kwargs Returns ------- str The name of the checkplot file that was updated. None if t...
def cp_objectinfo_worker(task): '''This is a parallel worker for `parallel_update_cp_objectinfo`. Parameters ---------- task : tuple - task[0] = checkplot pickle file - task[1] = kwargs Returns ------- str The name of the checkplot file that was updated. None if t...
[ "This", "is", "a", "parallel", "worker", "for", "parallel_update_cp_objectinfo", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/checkplotproc.py#L722-L750
[ "def", "cp_objectinfo_worker", "(", "task", ")", ":", "cpf", ",", "cpkwargs", "=", "task", "try", ":", "newcpf", "=", "update_checkplot_objectinfo", "(", "cpf", ",", "*", "*", "cpkwargs", ")", "return", "newcpf", "except", "Exception", "as", "e", ":", "LOG...
2922a14619d183fb28005fa7d02027ac436f2265
valid
parallel_update_objectinfo_cplist
This updates objectinfo for a list of checkplots. Useful in cases where a previous round of GAIA/finderchart/external catalog acquisition failed. This will preserve the following keys in the checkplots if they exist: comments varinfo objectinfo.objecttags Parameters ---------- cp...
astrobase/lcproc/checkplotproc.py
def parallel_update_objectinfo_cplist( cplist, liststartindex=None, maxobjects=None, nworkers=NCPUS, fast_mode=False, findercmap='gray_r', finderconvolve=None, deredden_object=True, custom_bandpasses=None, gaia_submit_timeout=10.0, ...
def parallel_update_objectinfo_cplist( cplist, liststartindex=None, maxobjects=None, nworkers=NCPUS, fast_mode=False, findercmap='gray_r', finderconvolve=None, deredden_object=True, custom_bandpasses=None, gaia_submit_timeout=10.0, ...
[ "This", "updates", "objectinfo", "for", "a", "list", "of", "checkplots", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/checkplotproc.py#L754-L948
[ "def", "parallel_update_objectinfo_cplist", "(", "cplist", ",", "liststartindex", "=", "None", ",", "maxobjects", "=", "None", ",", "nworkers", "=", "NCPUS", ",", "fast_mode", "=", "False", ",", "findercmap", "=", "'gray_r'", ",", "finderconvolve", "=", "None", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
parallel_update_objectinfo_cpdir
This updates the objectinfo for a directory of checkplot pickles. Useful in cases where a previous round of GAIA/finderchart/external catalog acquisition failed. This will preserve the following keys in the checkplots if they exist: comments varinfo objectinfo.objecttags Parameters --...
astrobase/lcproc/checkplotproc.py
def parallel_update_objectinfo_cpdir(cpdir, cpglob='checkplot-*.pkl*', liststartindex=None, maxobjects=None, nworkers=NCPUS, fast_mode=...
def parallel_update_objectinfo_cpdir(cpdir, cpglob='checkplot-*.pkl*', liststartindex=None, maxobjects=None, nworkers=NCPUS, fast_mode=...
[ "This", "updates", "the", "objectinfo", "for", "a", "directory", "of", "checkplot", "pickles", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcproc/checkplotproc.py#L952-L1126
[ "def", "parallel_update_objectinfo_cpdir", "(", "cpdir", ",", "cpglob", "=", "'checkplot-*.pkl*'", ",", "liststartindex", "=", "None", ",", "maxobjects", "=", "None", ",", "nworkers", "=", "NCPUS", ",", "fast_mode", "=", "False", ",", "findercmap", "=", "'gray_r...
2922a14619d183fb28005fa7d02027ac436f2265
valid
checkplot_infokey_worker
This gets the required keys from the requested file. Parameters ---------- task : tuple Task is a two element tuple:: - task[0] is the dict to work on - task[1] is a list of lists of str indicating all the key address to extract items from the dict for Returns ...
astrobase/cpserver/checkplotlist.py
def checkplot_infokey_worker(task): '''This gets the required keys from the requested file. Parameters ---------- task : tuple Task is a two element tuple:: - task[0] is the dict to work on - task[1] is a list of lists of str indicating all the key address to extrac...
def checkplot_infokey_worker(task): '''This gets the required keys from the requested file. Parameters ---------- task : tuple Task is a two element tuple:: - task[0] is the dict to work on - task[1] is a list of lists of str indicating all the key address to extrac...
[ "This", "gets", "the", "required", "keys", "from", "the", "requested", "file", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/cpserver/checkplotlist.py#L169-L203
[ "def", "checkplot_infokey_worker", "(", "task", ")", ":", "cpf", ",", "keys", "=", "task", "cpd", "=", "_read_checkplot_picklefile", "(", "cpf", ")", "resultkeys", "=", "[", "]", "for", "k", "in", "keys", ":", "try", ":", "resultkeys", ".", "append", "("...
2922a14619d183fb28005fa7d02027ac436f2265
valid
main
This is the main function of this script. The current script args are shown below :: Usage: checkplotlist [-h] [--search SEARCH] [--sortby SORTBY] [--filterby FILTERBY] [--splitout SPLITOUT] [--outprefix OUTPREFIX] [--maxkeyworkers MAXKEYWORKERS] ...
astrobase/cpserver/checkplotlist.py
def main(): '''This is the main function of this script. The current script args are shown below :: Usage: checkplotlist [-h] [--search SEARCH] [--sortby SORTBY] [--filterby FILTERBY] [--splitout SPLITOUT] [--outprefix OUTPREFIX] [--maxkeyworke...
def main(): '''This is the main function of this script. The current script args are shown below :: Usage: checkplotlist [-h] [--search SEARCH] [--sortby SORTBY] [--filterby FILTERBY] [--splitout SPLITOUT] [--outprefix OUTPREFIX] [--maxkeyworke...
[ "This", "is", "the", "main", "function", "of", "this", "script", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/cpserver/checkplotlist.py#L227-L763
[ "def", "main", "(", ")", ":", "####################", "## PARSE THE ARGS ##", "####################", "aparser", "=", "argparse", ".", "ArgumentParser", "(", "epilog", "=", "PROGEPILOG", ",", "description", "=", "PROGDESC", ",", "formatter_class", "=", "argparse", "...
2922a14619d183fb28005fa7d02027ac436f2265
valid
_gaussian
This is a simple gaussian. Parameters ---------- x : np.array The items at which the Gaussian is evaluated. amp : float The amplitude of the Gaussian. loc : float The central value of the Gaussian. std : float The standard deviation of the Gaussian. Retu...
astrobase/lcmodels/eclipses.py
def _gaussian(x, amp, loc, std): '''This is a simple gaussian. Parameters ---------- x : np.array The items at which the Gaussian is evaluated. amp : float The amplitude of the Gaussian. loc : float The central value of the Gaussian. std : float The stand...
def _gaussian(x, amp, loc, std): '''This is a simple gaussian. Parameters ---------- x : np.array The items at which the Gaussian is evaluated. amp : float The amplitude of the Gaussian. loc : float The central value of the Gaussian. std : float The stand...
[ "This", "is", "a", "simple", "gaussian", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcmodels/eclipses.py#L19-L46
[ "def", "_gaussian", "(", "x", ",", "amp", ",", "loc", ",", "std", ")", ":", "return", "amp", "*", "np", ".", "exp", "(", "-", "(", "(", "x", "-", "loc", ")", "*", "(", "x", "-", "loc", ")", ")", "/", "(", "2.0", "*", "std", "*", "std", ...
2922a14619d183fb28005fa7d02027ac436f2265
valid
_double_inverted_gaussian
This is a double inverted gaussian. Parameters ---------- x : np.array The items at which the Gaussian is evaluated. amp1,amp2 : float The amplitude of Gaussian 1 and Gaussian 2. loc1,loc2 : float The central value of Gaussian 1 and Gaussian 2. std1,std2 : float ...
astrobase/lcmodels/eclipses.py
def _double_inverted_gaussian(x, amp1, loc1, std1, amp2, loc2, std2): '''This is a double inverted gaussian. Parameters ---------- x : np.array The items at which the Gaussian is evaluated. amp1,amp2 : float The amplitude...
def _double_inverted_gaussian(x, amp1, loc1, std1, amp2, loc2, std2): '''This is a double inverted gaussian. Parameters ---------- x : np.array The items at which the Gaussian is evaluated. amp1,amp2 : float The amplitude...
[ "This", "is", "a", "double", "inverted", "gaussian", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcmodels/eclipses.py#L50-L82
[ "def", "_double_inverted_gaussian", "(", "x", ",", "amp1", ",", "loc1", ",", "std1", ",", "amp2", ",", "loc2", ",", "std2", ")", ":", "gaussian1", "=", "-", "_gaussian", "(", "x", ",", "amp1", ",", "loc1", ",", "std1", ")", "gaussian2", "=", "-", "...
2922a14619d183fb28005fa7d02027ac436f2265
valid
invgauss_eclipses_func
This returns a double eclipse shaped function. Suitable for first order modeling of eclipsing binaries. Parameters ---------- ebparams : list of float This contains the parameters for the eclipsing binary:: ebparams = [period (time), epoch (time), ...
astrobase/lcmodels/eclipses.py
def invgauss_eclipses_func(ebparams, times, mags, errs): '''This returns a double eclipse shaped function. Suitable for first order modeling of eclipsing binaries. Parameters ---------- ebparams : list of float This contains the parameters for the eclipsing binary:: ebparams ...
def invgauss_eclipses_func(ebparams, times, mags, errs): '''This returns a double eclipse shaped function. Suitable for first order modeling of eclipsing binaries. Parameters ---------- ebparams : list of float This contains the parameters for the eclipsing binary:: ebparams ...
[ "This", "returns", "a", "double", "eclipse", "shaped", "function", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcmodels/eclipses.py#L86-L196
[ "def", "invgauss_eclipses_func", "(", "ebparams", ",", "times", ",", "mags", ",", "errs", ")", ":", "(", "period", ",", "epoch", ",", "pdepth", ",", "pduration", ",", "depthratio", ",", "secondaryphase", ")", "=", "ebparams", "# generate the phases", "iphase",...
2922a14619d183fb28005fa7d02027ac436f2265
valid
invgauss_eclipses_residual
This returns the residual between the modelmags and the actual mags. Parameters ---------- ebparams : list of float This contains the parameters for the eclipsing binary:: ebparams = [period (time), epoch (time), pdepth: primary eclipse ...
astrobase/lcmodels/eclipses.py
def invgauss_eclipses_residual(ebparams, times, mags, errs): '''This returns the residual between the modelmags and the actual mags. Parameters ---------- ebparams : list of float This contains the parameters for the eclipsing binary:: ebparams = [period (time), ...
def invgauss_eclipses_residual(ebparams, times, mags, errs): '''This returns the residual between the modelmags and the actual mags. Parameters ---------- ebparams : list of float This contains the parameters for the eclipsing binary:: ebparams = [period (time), ...
[ "This", "returns", "the", "residual", "between", "the", "modelmags", "and", "the", "actual", "mags", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/lcmodels/eclipses.py#L200-L256
[ "def", "invgauss_eclipses_residual", "(", "ebparams", ",", "times", ",", "mags", ",", "errs", ")", ":", "modelmags", ",", "phase", ",", "ptimes", ",", "pmags", ",", "perrs", "=", "(", "invgauss_eclipses_func", "(", "ebparams", ",", "times", ",", "mags", ",...
2922a14619d183fb28005fa7d02027ac436f2265
valid
convert_constants
This converts between JHK and BVRI/SDSS mags. Not meant to be used directly. See the functions below for more sensible interface. This function does the grunt work of converting from JHK to either BVRI or SDSS ugriz. while taking care of missing values for any of jmag, hmag, or kmag. Parameters ...
astrobase/magnitudes.py
def convert_constants(jmag, hmag, kmag, cjhk, cjh, cjk, chk, cj, ch, ck): '''This converts between JHK and BVRI/SDSS mags. Not meant to be used directly. See the functions below for more sensible interface. This function does the grunt work ...
def convert_constants(jmag, hmag, kmag, cjhk, cjh, cjk, chk, cj, ch, ck): '''This converts between JHK and BVRI/SDSS mags. Not meant to be used directly. See the functions below for more sensible interface. This function does the grunt work ...
[ "This", "converts", "between", "JHK", "and", "BVRI", "/", "SDSS", "mags", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/magnitudes.py#L96-L166
[ "def", "convert_constants", "(", "jmag", ",", "hmag", ",", "kmag", ",", "cjhk", ",", "cjh", ",", "cjk", ",", "chk", ",", "cj", ",", "ch", ",", "ck", ")", ":", "if", "jmag", "is", "not", "None", ":", "if", "hmag", "is", "not", "None", ":", "if",...
2922a14619d183fb28005fa7d02027ac436f2265
valid
jhk_to_bmag
Converts given J, H, Ks mags to a B magnitude value. Parameters ---------- jmag,hmag,kmag : float 2MASS J, H, Ks mags of the object. Returns ------- float The converted B band magnitude.
astrobase/magnitudes.py
def jhk_to_bmag(jmag, hmag, kmag): '''Converts given J, H, Ks mags to a B magnitude value. Parameters ---------- jmag,hmag,kmag : float 2MASS J, H, Ks mags of the object. Returns ------- float The converted B band magnitude. ''' return convert_constants(jmag,hma...
def jhk_to_bmag(jmag, hmag, kmag): '''Converts given J, H, Ks mags to a B magnitude value. Parameters ---------- jmag,hmag,kmag : float 2MASS J, H, Ks mags of the object. Returns ------- float The converted B band magnitude. ''' return convert_constants(jmag,hma...
[ "Converts", "given", "J", "H", "Ks", "mags", "to", "a", "B", "magnitude", "value", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/magnitudes.py#L173-L193
[ "def", "jhk_to_bmag", "(", "jmag", ",", "hmag", ",", "kmag", ")", ":", "return", "convert_constants", "(", "jmag", ",", "hmag", ",", "kmag", ",", "BJHK", ",", "BJH", ",", "BJK", ",", "BHK", ",", "BJ", ",", "BH", ",", "BK", ")" ]
2922a14619d183fb28005fa7d02027ac436f2265
valid
jhk_to_vmag
Converts given J, H, Ks mags to a V magnitude value. Parameters ---------- jmag,hmag,kmag : float 2MASS J, H, Ks mags of the object. Returns ------- float The converted V band magnitude.
astrobase/magnitudes.py
def jhk_to_vmag(jmag,hmag,kmag): '''Converts given J, H, Ks mags to a V magnitude value. Parameters ---------- jmag,hmag,kmag : float 2MASS J, H, Ks mags of the object. Returns ------- float The converted V band magnitude. ''' return convert_constants(jmag,hmag,...
def jhk_to_vmag(jmag,hmag,kmag): '''Converts given J, H, Ks mags to a V magnitude value. Parameters ---------- jmag,hmag,kmag : float 2MASS J, H, Ks mags of the object. Returns ------- float The converted V band magnitude. ''' return convert_constants(jmag,hmag,...
[ "Converts", "given", "J", "H", "Ks", "mags", "to", "a", "V", "magnitude", "value", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/magnitudes.py#L197-L217
[ "def", "jhk_to_vmag", "(", "jmag", ",", "hmag", ",", "kmag", ")", ":", "return", "convert_constants", "(", "jmag", ",", "hmag", ",", "kmag", ",", "VJHK", ",", "VJH", ",", "VJK", ",", "VHK", ",", "VJ", ",", "VH", ",", "VK", ")" ]
2922a14619d183fb28005fa7d02027ac436f2265
valid
jhk_to_rmag
Converts given J, H, Ks mags to an R magnitude value. Parameters ---------- jmag,hmag,kmag : float 2MASS J, H, Ks mags of the object. Returns ------- float The converted R band magnitude.
astrobase/magnitudes.py
def jhk_to_rmag(jmag,hmag,kmag): '''Converts given J, H, Ks mags to an R magnitude value. Parameters ---------- jmag,hmag,kmag : float 2MASS J, H, Ks mags of the object. Returns ------- float The converted R band magnitude. ''' return convert_constants(jmag,hmag...
def jhk_to_rmag(jmag,hmag,kmag): '''Converts given J, H, Ks mags to an R magnitude value. Parameters ---------- jmag,hmag,kmag : float 2MASS J, H, Ks mags of the object. Returns ------- float The converted R band magnitude. ''' return convert_constants(jmag,hmag...
[ "Converts", "given", "J", "H", "Ks", "mags", "to", "an", "R", "magnitude", "value", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/magnitudes.py#L221-L241
[ "def", "jhk_to_rmag", "(", "jmag", ",", "hmag", ",", "kmag", ")", ":", "return", "convert_constants", "(", "jmag", ",", "hmag", ",", "kmag", ",", "RJHK", ",", "RJH", ",", "RJK", ",", "RHK", ",", "RJ", ",", "RH", ",", "RK", ")" ]
2922a14619d183fb28005fa7d02027ac436f2265
valid
jhk_to_imag
Converts given J, H, Ks mags to an I magnitude value. Parameters ---------- jmag,hmag,kmag : float 2MASS J, H, Ks mags of the object. Returns ------- float The converted I band magnitude.
astrobase/magnitudes.py
def jhk_to_imag(jmag,hmag,kmag): '''Converts given J, H, Ks mags to an I magnitude value. Parameters ---------- jmag,hmag,kmag : float 2MASS J, H, Ks mags of the object. Returns ------- float The converted I band magnitude. ''' return convert_constants(jmag,hmag...
def jhk_to_imag(jmag,hmag,kmag): '''Converts given J, H, Ks mags to an I magnitude value. Parameters ---------- jmag,hmag,kmag : float 2MASS J, H, Ks mags of the object. Returns ------- float The converted I band magnitude. ''' return convert_constants(jmag,hmag...
[ "Converts", "given", "J", "H", "Ks", "mags", "to", "an", "I", "magnitude", "value", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/magnitudes.py#L245-L265
[ "def", "jhk_to_imag", "(", "jmag", ",", "hmag", ",", "kmag", ")", ":", "return", "convert_constants", "(", "jmag", ",", "hmag", ",", "kmag", ",", "IJHK", ",", "IJH", ",", "IJK", ",", "IHK", ",", "IJ", ",", "IH", ",", "IK", ")" ]
2922a14619d183fb28005fa7d02027ac436f2265
valid
jhk_to_sdssu
Converts given J, H, Ks mags to an SDSS u magnitude value. Parameters ---------- jmag,hmag,kmag : float 2MASS J, H, Ks mags of the object. Returns ------- float The converted SDSS u band magnitude.
astrobase/magnitudes.py
def jhk_to_sdssu(jmag,hmag,kmag): '''Converts given J, H, Ks mags to an SDSS u magnitude value. Parameters ---------- jmag,hmag,kmag : float 2MASS J, H, Ks mags of the object. Returns ------- float The converted SDSS u band magnitude. ''' return convert_constant...
def jhk_to_sdssu(jmag,hmag,kmag): '''Converts given J, H, Ks mags to an SDSS u magnitude value. Parameters ---------- jmag,hmag,kmag : float 2MASS J, H, Ks mags of the object. Returns ------- float The converted SDSS u band magnitude. ''' return convert_constant...
[ "Converts", "given", "J", "H", "Ks", "mags", "to", "an", "SDSS", "u", "magnitude", "value", "." ]
waqasbhatti/astrobase
python
https://github.com/waqasbhatti/astrobase/blob/2922a14619d183fb28005fa7d02027ac436f2265/astrobase/magnitudes.py#L272-L292
[ "def", "jhk_to_sdssu", "(", "jmag", ",", "hmag", ",", "kmag", ")", ":", "return", "convert_constants", "(", "jmag", ",", "hmag", ",", "kmag", ",", "SDSSU_JHK", ",", "SDSSU_JH", ",", "SDSSU_JK", ",", "SDSSU_HK", ",", "SDSSU_J", ",", "SDSSU_H", ",", "SDSSU...
2922a14619d183fb28005fa7d02027ac436f2265