repo
stringlengths
2
99
file
stringlengths
13
225
code
stringlengths
0
18.3M
file_length
int64
0
18.3M
avg_line_length
float64
0
1.36M
max_line_length
int64
0
4.26M
extension_type
stringclasses
1 value
lightkurve
lightkurve-main/tests/io/test_pathos.py
import pytest from astropy.io import fits import numpy as np from numpy.testing import assert_array_equal from lightkurve import search_lightcurve from lightkurve.io.pathos import read_pathos_lightcurve from lightkurve.io.detect import detect_filetype @pytest.mark.remote_data def test_detect_pathos(): """Can we...
2,016
35.672727
150
py
lightkurve
lightkurve-main/tests/io/test_eleanor.py
import pytest from astropy.io import fits from astropy.utils.data import get_pkg_data_filename import numpy as np from numpy.testing import assert_array_equal from lightkurve import search_lightcurve from lightkurve.io.eleanor import read_eleanor_lightcurve from lightkurve.io.detect import detect_filetype @pytest.m...
3,179
41.972973
99
py
lightkurve
lightkurve-main/tests/io/test_tasoc.py
import pytest from astropy.io import fits import numpy as np from numpy.testing import assert_array_equal from lightkurve import search_lightcurve from lightkurve.io.tasoc import read_tasoc_lightcurve from lightkurve.io.detect import detect_filetype # The URL needs to be updated upon a new TASOC data release. TEST_...
1,425
29.340426
192
py
lightkurve
lightkurve-main/tests/io/test_qlp.py
import pytest from astropy.io import fits import numpy as np from numpy.testing import assert_array_equal from lightkurve import search_lightcurve from lightkurve.io.qlp import read_qlp_lightcurve from lightkurve.io.detect import detect_filetype @pytest.mark.remote_data def test_qlp(): """Can we read in QLP lig...
1,259
35
164
py
lightkurve
lightkurve-main/tests/io/__init__.py
0
0
0
py
lightkurve
lightkurve-main/tests/io/test_read.py
import os import warnings import tempfile import pytest from lightkurve.utils import LightkurveDeprecationWarning, LightkurveError from lightkurve import ( PACKAGEDIR, KeplerTargetPixelFile, TessTargetPixelFile, LightCurve, ) from lightkurve.io import read from .. import TESTDATA def test_read(): ...
4,482
38.672566
115
py
lightkurve
lightkurve-main/tests/correctors/test_pldcorrector.py
import pytest import matplotlib.pyplot as plt from lightkurve import ( search_targetpixelfile, search_tesscut, KeplerLightCurve, TessLightCurve, ) from lightkurve.correctors import PLDCorrector @pytest.mark.remote_data def test_kepler_pld_corrector(): tpf = search_targetpixelfile("K2-199")[0].do...
3,818
34.036697
79
py
lightkurve
lightkurve-main/tests/correctors/test_sparsedesignmatrix.py
import pytest import warnings import numpy as np from numpy.testing import assert_array_equal import pandas as pd from scipy import sparse from lightkurve.correctors import ( SparseDesignMatrix, SparseDesignMatrixCollection, DesignMatrix, DesignMatrixCollection, ) from lightkurve import LightkurveWarn...
6,374
33.274194
88
py
lightkurve
lightkurve-main/tests/correctors/test_sffcorrector.py
"""Tests the `lightkurve.correctors.SFFCorrector` class.""" import pytest import warnings import numpy as np from astropy.utils.data import get_pkg_data_filename from numpy.testing import assert_array_equal from lightkurve import ( LightCurve, KeplerLightCurve, TessLightCurve, LightkurveWarning, s...
8,492
32.972
92
py
lightkurve
lightkurve-main/tests/correctors/test_cbvcorrector.py
""" cbvcorrector.py module unit tests """ import pytest from numpy.testing import ( assert_almost_equal, assert_array_equal, assert_allclose, assert_raises, ) import warnings import numpy as np import matplotlib import matplotlib.pyplot as plt import astropy.units as u import pandas as pd from astropy...
21,005
36.780576
110
py
lightkurve
lightkurve-main/tests/correctors/test_designmatrix.py
import pytest import warnings import numpy as np from numpy.testing import assert_array_equal import pandas as pd from lightkurve.correctors import DesignMatrix, DesignMatrixCollection from lightkurve import LightkurveWarning def test_designmatrix_basics(): """Can we create a design matrix from a dataframe?""" ...
4,720
32.246479
87
py
lightkurve
lightkurve-main/tests/correctors/__init__.py
0
0
0
py
lightkurve
lightkurve-main/tests/correctors/test_metrics.py
import numpy as np import pytest from numpy.testing import assert_allclose from lightkurve import LightCurve, search_lightcurve from lightkurve.correctors.metrics import ( overfit_metric_lombscargle, underfit_metric_neighbors, _compute_correlation, _align_to_lc, ) def test_overfit_metric_lombscargle(...
3,718
35.106796
96
py
lightkurve
lightkurve-main/tests/correctors/test_regressioncorrector.py
"""Unit tests for the `RegressionCorrector` class.""" import warnings import numpy as np from numpy.testing import assert_almost_equal import pandas as pd import pytest from lightkurve import LightCurve, LightkurveWarning from lightkurve.correctors import RegressionCorrector, DesignMatrix def test_regressioncorrect...
4,463
36.512605
87
py
lightkurve
lightkurve-main/tests/prf/__init__.py
0
0
0
py
lightkurve
lightkurve-main/tests/prf/test_tpfmodel.py
"""Test the features of the lightkurve.prf.tpfmodels module.""" import os import pytest from astropy.io import fits import numpy as np from numpy.testing import assert_allclose from scipy.stats import mode from lightkurve.prf import FixedValuePrior, GaussianPrior, UniformPrior from lightkurve.prf import StarPrior, Ba...
7,272
35.547739
86
py
lightkurve
lightkurve-main/tests/prf/test_prfmodel.py
"""Test the features of the lightkurve.prf.prfmodels module.""" from __future__ import division, print_function from collections import OrderedDict from astropy.io import fits from astropy.utils.data import get_pkg_data_filename import numpy as np from numpy.testing import assert_allclose import pytest from lightkurv...
4,845
35.164179
87
py
lightkurve
lightkurve-main/tests/seismology/test_butler.py
import pytest from astropy import units as u import matplotlib.pyplot as plt import numpy as np from scipy.signal import unit_impulse as deltafn from lightkurve.search import search_lightcurve from lightkurve.periodogram import Periodogram from lightkurve.periodogram import SNRPeriodogram @pytest.mark.remote_data de...
14,457
37.657754
87
py
lightkurve
lightkurve-main/tests/seismology/__init__.py
0
0
0
py
lightkurve
lightkurve-main/tests/seismology/test_stellar_estimators.py
from astropy import units as u import numpy as np from uncertainties import ufloat from lightkurve.seismology.stellar_estimators import ( NUMAX_SOL, DELTANU_SOL, TEFF_SOL, G_SOL, estimate_radius, estimate_mass, estimate_logg, ) cM = ufloat(1.30, 0.09) cR = ufloat(9.91, 0.24) clogg = ufloa...
6,995
29.955752
85
py
lightkurve
lightkurve-main/docs/source/conf.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. import os import sys sys.path.appe...
5,016
33.363014
326
py
YouTube-GDD
YouTube-GDD-main/tools/download.py
from pytube import YouTube import argparse import os parser = argparse.ArgumentParser(description='Download YouTube videos') parser.add_argument('--videolist', default='./configs/videolist.txt') parser.add_argument('--videopath', default='videos') args = parser.parse_args() if __name__ == '__main__': if not os.path...
830
32.24
131
py
YouTube-GDD
YouTube-GDD-main/tools/select.py
import argparse import os import shutil import numpy as np parser = argparse.ArgumentParser(description='Select YouTube-GDD images') parser.add_argument('--imagelist', default='./configs/imagelist.npy') parser.add_argument('--framepath', default='frames') parser.add_argument('--imagepath', default='images') args = pa...
839
37.181818
73
py
YouTube-GDD
YouTube-GDD-main/tools/extract.py
import argparse import os import cv2 import math parser = argparse.ArgumentParser(description='Extract YouTube frames') parser.add_argument('--videopath', default='videos') parser.add_argument('--framepath', default='frames') def extract_frames(video_path, dst_folder, extract_frequency, abstract_name, frame_rate, in...
1,354
32.875
114
py
r-AdjNorm
r-AdjNorm-main/src/main.py
''' Tensorflow Implementation of r-Adjnorm model in: Minghao Zhao et al. Investigating Accuracy-Novelty Performance for Graph-based Collaborative Filtering. In SIGIR 2022. @author: Minghao Zhao([email protected]) ''' #################################################### # This section of code adapted from W...
26,223
43.674617
282
py
r-AdjNorm
r-AdjNorm-main/src/utility/parser.py
''' Tensorflow Implementation of r-Adjnorm model in: Minghao Zhao et al. Investigating Accuracy-Novelty Performance for Graph-based Collaborative Filtering. In SIGIR 2022. @author: Minghao Zhao([email protected]) ''' #################################################### # This section of code adapted from W...
6,115
52.182609
135
py
r-AdjNorm
r-AdjNorm-main/src/utility/helper.py
''' Tensorflow Implementation of r-Adjnorm model in: Minghao Zhao et al. Investigating Accuracy-Novelty Performance for Graph-based Collaborative Filtering. In SIGIR 2022. @author: Minghao Zhao([email protected]) ''' #################################################### # This section of code adapted from W...
1,743
30.142857
119
py
r-AdjNorm
r-AdjNorm-main/src/utility/batch_test.py
''' Tensorflow Implementation of r-Adjnorm model in: Minghao Zhao et al. Investigating Accuracy-Novelty Performance for Graph-based Collaborative Filtering. In SIGIR 2022. @author: Minghao Zhao([email protected]) ''' #################################################### # This section of code adapted from W...
10,127
34.044983
119
py
r-AdjNorm
r-AdjNorm-main/src/utility/metrics.py
''' Tensorflow Implementation of r-Adjnorm model in: Minghao Zhao et al. Investigating Accuracy-Novelty Performance for Graph-based Collaborative Filtering. In SIGIR 2022. @author: Minghao Zhao([email protected]) ''' #################################################### # This section of code adapted from W...
2,935
26.185185
119
py
r-AdjNorm
r-AdjNorm-main/src/utility/load_data.py
''' Tensorflow Implementation of r-Adjnorm model in: Minghao Zhao et al. Investigating Accuracy-Novelty Performance for Graph-based Collaborative Filtering. In SIGIR 2022. @author: Minghao Zhao([email protected]) ''' #################################################### # This section of code adapted from W...
15,834
36.434988
178
py
ec-local-rings
ec-local-rings-main/zfx_fast.py
from itertools import combinations_with_replacement from time import time from math import factorial class Monom: def __init__(self, a=(0,0,0,0,0,0), x=0, z=0): self.a = a # len(a) == 6 !!! self.x = x self.z = z def get_deg(self): # Total degree of m: deg(x) + 3deg(z) return self.x + 3*self.z def get_si...
3,079
20.690141
78
py
ec-local-rings
ec-local-rings-main/zfxred_fast.py
from itertools import combinations_with_replacement from time import time from math import factorial class Monom: def __init__(self, a=(0,0,0), x=0, z=0): # a = (a_0, A, B) self.a = a # len(a) == 3 !!! self.x = x self.z = z def get_deg(self): # Total degree of m: deg(x) + 3deg(z) return self.x + 3*self....
3,213
20.284768
78
py
ChromaStarPy
ChromaStarPy-master/CSGasEst.py
# -*- coding: utf-8 -*- """ Created on Tue May 7 11:25:12 2019 @author: Philip D. Bennett Port from FORTRAN to Python: Ian Short """ import math import numpy #from scipy.linalg.blas import daxpy #from scipy.linalg.blas import ddot #from scipy.linalg.blas import dscal #from scipy.linalg.blas import idamax #import Do...
19,667
28.443114
122
py
ChromaStarPy
ChromaStarPy-master/vegatest.py
# -*- coding: utf-8 -*- """ Created on Wed Aug 30 10:54:21 2017 @author: ishort """ #plotting: import matplotlib import matplotlib.pyplot as plt #%matplotlib inline import pylab from astropy.io import fits import numpy import Gauss2 #General file for printing ad hoc quantities #dbgHandle = open("debug.out", 'w') ...
8,521
27.693603
131
py
ChromaStarPy
ChromaStarPy-master/Flux.py
# -*- coding: utf-8 -*- """ Created on Sat Apr 29 17:42:58 2017 @author: Ian """ import math import random import numpy import Useful import ToolBox def flux(intens, cosTheta): """// returns surface flux as a 2XnumLams vector // - Row 0 linear flux (cgs units) // - Row 1 log_e flux""" #//doub...
11,496
38.373288
195
py
ChromaStarPy
ChromaStarPy-master/FormalSoln.py
# -*- coding: utf-8 -*- """ Created on Sat Apr 29 17:29:05 2017 @author: Ian """ import math import Planck def formalSoln(numDeps, cosTheta, lambda2, tau, temp, lineMode): """/** * Formal solution of the LTE radiative transfer for the monochromatic *surface* * intensity, I_lambda(Tau=0, theta) at waveleng...
4,506
35.942623
106
py
ChromaStarPy
ChromaStarPy-master/CSGasData.py
import CSBlockData global name, ip, comp, awt, nspec, natom, itab, ntab, indx, iprint, gsinit, print0 #/gasp/ global ipr, nch, nel, ntot, nat, zat, neut, idel, indsp, indzat, iat, natsp, iatsp #/gasp2/ ip = CSBlockData.ip comp = CSBlockData.comp awt = CSBlockData.awt name = CSBlockData.name ipr = CSBlockData.ipr nch...
20,312
160.214286
295
py
ChromaStarPy
ChromaStarPy-master/PostProcess.py
# -*- coding: utf-8 -*- """ Created on Wed May 3 12:20:48 2017 @author: ishort """ """/**** Routines for client side post-processing of raw model atmosphere/spectrum * synthesis output from server to produce synthetic observables */""" import math import numpy import Useful import ToolBox nm2cm = 1.0e-7 def UBV...
40,742
34.305893
178
py
ChromaStarPy
ChromaStarPy-master/VegaHgamma.py
# # #Custom filename tags to distinguish from other runs project = "Project" runVers = "Run" #Default plot #Select ONE only: #makePlot = "structure" #makePlot = "sed" makePlot = "spectrum" #makePlot = "ldc" #makePlot = "ft" #makePlot = "tlaLine" #Spectrum synthesis mode # - uses model in Restart.py with minimal str...
2,690
33.063291
116
py
ChromaStarPy
ChromaStarPy-master/Input.py
# # #Custom filename tags to distinguish from other runs project = "SunEarth" runVers = "Test" #Project specific notes: # Test case: # Star: Sun # Spectrum: Na I D region # Lightcurve: Earth, in plane of ecliptic #Default plot #Select ONE only if plotting 'inline' - makePlotStruc = True makePlotSED = True mak...
3,920
35.990566
116
py
ChromaStarPy
ChromaStarPy-master/Gauss2.py
# -*- coding: utf-8 -*- """ Created on Thu Sep 21 16:29:34 2017 @author: ishort """ import math """ procedure to generate Gaussian of unit area when passed a FWHM""" #IDL: PRO GAUSS2,FWHM,LENGTH,NGAUS def gauss2(fwhm, length): #length=length*1l & FWHM=FWHM*1l #NGAUS=FLTARR(LENGTH) ngaus = [0.0 ...
955
21.761905
72
py
ChromaStarPy
ChromaStarPy-master/CSGas.py
# -*- coding: utf-8 -*- """ Created on Thu May 2 10:00:46 2019 @author: Philip D. Bennett Port from FORTRAN to Python: Ian Short """ """ This is the main source file for GAS. """ """ /* * The openStar project: stellar atmospheres and spectra * * ChromaStarPy/GAS * * Version 2019-05-02 * Use date based versio...
38,285
34.614884
275
py
ChromaStarPy
ChromaStarPy-master/Kappas.py
# -*- coding: utf-8 -*- """ Created on Mon Apr 24 17:12:02 2017 @author: ishort """ import math import Planck import Useful def kappas2(numDeps, pe, zScale, temp, rho, numLams, lambdas, logAHe, \ logNH1, logNH2, logNHe1, logNHe2, Ne, teff, logKapFudge): """/* Compute opacities properly from scr...
32,644
39.857322
142
py
ChromaStarPy
ChromaStarPy-master/LineGrid.py
# -*- coding: utf-8 -*- """ Created on Sat Apr 29 13:31:10 2017 @author: Ian """ import math import Useful """/** * Line profile, phi_lambda(lambda): Assume Voigt function profile - need H(a,v) * Assumes CRD, LTE, ??? Input parameters: lam0 - line center wavelength in nm * mass - mass of absorbing particle (amu) ...
10,935
31.35503
114
py
ChromaStarPy
ChromaStarPy-master/MolecData.py
# -*- coding: utf-8 -*- """ Created on Fri Apr 28 15:53:32 2017 @author: ishort """ #//Various diatomic molecular transition data needed for the #//Just-overlapping-line-approximation (JOLA) #// to molecular band opacity #//Input SYSTEM is a string with both the molecular species AND the band "system" import math...
11,055
27.791667
99
py
ChromaStarPy
ChromaStarPy-master/Dgefa.py
# -*- coding: utf-8 -*- """ Created on Fri May 3 12:09:11 2019 @author: """ import math import numpy #from scipy.linalg.blas import daxpy #from scipy.linalg.blas import ddot #from scipy.linalg.blas import dscal #from scipy.linalg.blas import idamax #from Documents.ChromaStarPy.GAS.blas.Ddot import ddot #from Docum...
6,906
31.125581
119
py
ChromaStarPy
ChromaStarPy-master/LevelPopsGasServer.py
# -*- coding: utf-8 -*- """ Created on Mon Apr 24 14:13:47 2017 @author: ishort """ import math import Useful import ToolBox #import numpy #JB# #from matplotlib.pyplot import plot, title, show, scatter #storage for fits (not all may be used) uw = [] uwa = [] uwb = [] uwStage = [] uwbStage = [] uwu = [] uwl = [] uua=[...
54,663
39.977511
287
py
ChromaStarPy
ChromaStarPy-master/TauScale.py
# -*- coding: utf-8 -*- """ Created on Fri Apr 21 09:46:06 2017 Create the standard optical depth scale sampling the model vertically - interpreted as the Rosseland optical depth scale Uniformly spaced in log(tau) @author: ishort """ import math def tauScale(numDeps, log10MinDepth, log10MaxDepth): """Creat...
1,367
26.918367
113
py
ChromaStarPy
ChromaStarPy-master/FluxTrans.py
# -*- coding: utf-8 -*- """ Created on Sat Apr 29 17:42:58 2017 @author: Ian """ import math import numpy import random import numpy import Useful import ToolBox #Returns a vector of reduced fluxes for each angle theta being tannsited by planet #// def fluxTrans(intens, flx, lambdas, cosTheta, radius, ...
2,264
31.357143
122
py
ChromaStarPy
ChromaStarPy-master/T4300g45CaIIHK.py
# # #Custom filename tags to distinguish from other runs project = "Project" runVers = "Run" #Default plot #Select ONE only: #makePlot = "structure" #makePlot = "sed" makePlot = "spectrum" #makePlot = "ldc" #makePlot = "ft" #makePlot = "tlaLine" #Spectrum synthesis mode # - uses model in Restart.py with minimal str...
2,668
33.662338
116
py
ChromaStarPy
ChromaStarPy-master/Hydrostat.py
# -*- coding: utf-8 -*- """ Created on Fri Apr 21 16:07:56 2017 @author: ishort """ import math import Useful def hydroFormalSoln(numDeps, grav, tauRos, kappa, temp, guessPGas): """This approach is based on integrating the formal solution of the hydrostaitc equilibrium equation // on the otical depth (Tau) ...
4,462
33.068702
119
py
ChromaStarPy
ChromaStarPy-master/Jola.py
# -*- coding: utf-8 -*- """ Created on Fri Apr 28 16:10:08 2017 @author: ishort """ #/** # * Collection of methods for computing molecular band opacity in the # * Just-overlapping-line approximation (JOLA) # * Just-overlapping line approximation treats molecular ro-vibrational bands as pseudo-continuum # * opacity so...
11,506
34.736025
245
py
ChromaStarPy
ChromaStarPy-master/A0Halpha.py
# # #Custom filename tags to distinguish from other runs project = "Project" runVers = "Run" #Default plot #Select ONE only: #makePlot = "structure" #makePlot = "sed" makePlot = "spectrum" #makePlot = "ldc" #makePlot = "ft" #makePlot = "tlaLine" #Spectrum synthesis mode # - uses model in Restart.py with minimal str...
2,668
33.217949
116
py
ChromaStarPy
ChromaStarPy-master/PartitionFn.py
# -*- coding: utf-8 -*- """ Created on Mon Apr 24 17:12:02 2017 @author: ishort """ import math def getPartFn(species): """// Partition functions at two temperatures (5000 K and 10000 K) //From Allen's Astrophysical Quantities, 4th Ed. // CAUTION: Return Base 10 log10 of partition fn""" #//Ionization stages t...
107,648
29.677971
93
py
ChromaStarPy
ChromaStarPy-master/TransitLightCurveAnlytc2.py
# -*- coding: utf-8 -*- """ Created on Sun Jan 12 13:06:03 2020 @author: iansh """ import math import numpy import Useful #import sys import matplotlib.pyplot as plt """ # # Compute the analytic light curve in the small-planet approximation of Mandel # and Agol 2002, Eq. Section 5 ("Analytic Lightcurves for Plan...
4,989
34.899281
98
py
ChromaStarPy
ChromaStarPy-master/TransitLightCurve2.py
# -*- coding: utf-8 -*- """ Created on Sun Jan 12 13:06:03 2020 @author: iansh """ import math import numpy import Useful #import sys import matplotlib.pyplot as plt """ # Reads in planetary system parameters for a single planet around a single star #and computes the impact parameter and time coordinate of snapsh...
3,370
33.050505
100
py
ChromaStarPy
ChromaStarPy-master/State.py
# -*- coding: utf-8 -*- """ Created on Fri Apr 21 15:10:06 2017 @author: ishort """ import math import Useful import AtomicMass def massDensity(numDeps, temp, press, mmw, zScale): """Solves the equation of state (EOS) for the mass density (rho) given total * pressure from HSE solution, for a mixture of ideal g...
4,649
32.695652
127
py
ChromaStarPy
ChromaStarPy-master/AlfBooCaIIHK.py
# # #Custom filename tags to distinguish from other runs project = "Project" runVers = "Run" #Default plot #Select ONE only: #makePlot = "structure" #makePlot = "sed" makePlot = "spectrum" #makePlot = "ldc" #makePlot = "ft" #makePlot = "tlaLine" #Spectrum synthesis mode # - uses model in Restart.py with minimal str...
2,865
34.382716
132
py
ChromaStarPy
ChromaStarPy-master/Useful.py
# -*- coding: utf-8 -*- """ Created on Fri Apr 21 12:00:20 2017 linear and logarithmic physical constant and conversion factors cgs units @author: ishort """ import math def c(): return 2.9979249E+10 #// light speed in vaccuum in cm/s def sigma(): return 5.670373E-5 #//Stefan-Boltzmann constant er...
1,792
18.922222
76
py
ChromaStarPy
ChromaStarPy-master/Restart.py
# Teff 3750.0 logg 2.0 [Fe/H] 0.0 massStar 1.0 xiT 1.0 HeFe 0.0 CO 0.0 AlfFe 0.0 lineThresh -3.0 voigtThresh -3.0 lambda0 5.15e-05 lambda1 5.1899999999999994e-05 logGamCol 0.0 logKapFudge 0.0 macroV 1.0 rotV 1.0 rotI 90.0 RV 0.0 nInner 12 nOuter 12 ifMols 1 sampling fine teffRS = 3750.0 # K loggRS = 2.0 #log (cm/^2) l...
18,260
245.77027
1,126
py
ChromaStarPy
ChromaStarPy-master/Thetas.py
# -*- coding: utf-8 -*- """ Created on Thu Apr 27 17:28:47 2017 @author: Ian """ import math def thetas(): #//int numThetas = 10; // guess #//double[] cosTheta = new double[numThetas]; #// Try equal distribution in cos(theta) space (rather than Gaussian quadrature) """ /* double ii; for (in...
7,386
35.751244
97
py
ChromaStarPy
ChromaStarPy-master/alfbootest.py
# -*- coding: utf-8 -*- """ Created on Wed Aug 30 10:54:21 2017 @author: ishort """ #plotting: import matplotlib import matplotlib.pyplot as plt #%matplotlib inline import pylab #General file for printing ad hoc quantities #dbgHandle = open("debug.out", 'w') #Get the data dataPath = "AlfBooAtlas/" #outPath = absPat...
6,107
27.409302
106
py
ChromaStarPy
ChromaStarPy-master/CSGsRead2.py
# -*- coding: utf-8 -*- """ Created on Wed May 8 11:32:00 2019 @author: Phil Bennett - ported to python and integrated with ChromaStarPy (CSPy) by Ian Short """ #FORTRAN unit 4 with data about species to include: # No! import Fort4 #import Documents.ChromaStarPy.GAS.BlockData import CSBlockData import CSGasData...
18,369
32.278986
173
py
ChromaStarPy
ChromaStarPy-master/KappasMetal.py
# -*- coding: utf-8 -*- """ Created on Tue Apr 25 14:48:00 2017 @author: ishort """ import math import Useful import PartitionFn import ToolBox #import numpy #JB# """ #a function to create a cubic function fit extrapolation def cubicFit(x,y): coeffs = numpy.polyfit(x,y,3) #returns an array of coef...
42,559
37.62069
220
py
ChromaStarPy
ChromaStarPy-master/SunNaID.py
# # #Custom filename tags to distinguish from other runs project = "Project" runVers = "Run" #Default plot #Select ONE only: #makePlot = "structure" #makePlot = "sed" makePlot = "spectrum" #makePlot = "ldc" #makePlot = "ft" #makePlot = "tlaLine" #Spectrum synthesis mode # - uses model in Restart.py with minimal str...
2,669
33.230769
116
py
ChromaStarPy
ChromaStarPy-master/MulGrayTCorr.py
# -*- coding: utf-8 -*- """ Created on Thu May 11 12:25:33 2017 @author: ishort """ import math import Useful import ToolBox def mgTCorr(numDeps, teff, tauRos, temp, rho, kappa): #// updated temperature structure newTemp = [ [ 0.0 for i in range(numDeps) ] for j in range(2) ] #//Teff boundary between ea...
31,141
45.550075
212
py
ChromaStarPy
ChromaStarPy-master/SpecSyn.py
# -*- coding: utf-8 -*- """ Created on Fri Apr 28 17:03:30 2017 @author: ishort """ #/** # * # * Create master kappa_lambda(lambda) and tau_lambda(lambda) for # * FormalSoln.formalSoln() # * # * @author Ian # */ import math import ToolBox #plotting: import matplotlib import pylab def masterLambda(numLams, numMaster...
6,444
41.682119
151
py
ChromaStarPy
ChromaStarPy-master/LineKappa.py
# -*- coding: utf-8 -*- """ Created on Sat Apr 29 14:03:52 2017 @author: Ian """ """// Assumes CRD, LTE, ??? // Input parameters: // lam0 - line centre wavelength in nm // logNl - log_10 column density of absorbers in lower E-level, l (cm^-2) // logFlu - log_10 oscillator strength (unitless) // chiL - energy of lower...
7,712
41.379121
241
py
ChromaStarPy
ChromaStarPy-master/ChromaStarGasPy.py
# -*- coding: utf-8 -*- """ Spyder Editor This is the main source file for ChromaStarPy. We start here. """ """ /* * The openStar project: stellar atmospheres and spectra * * ChromaStarPy * * Version 2020-05-15 * Use date based versioning with ISO 8601 date (YYYY-MM-DD) * * December 2017 * * C. Ian Short...
197,848
37.128541
245
py
ChromaStarPy
ChromaStarPy-master/PPressPlotMols.py
# -*- coding: utf-8 -*- """ Created on Wed Aug 30 10:54:21 2017 @author: ishort """ #plotting: import matplotlib import matplotlib.pyplot as plt #%matplotlib inline import pylab from functools import reduce import subprocess import os import sys #General file for printing ad hoc quantities #dbgHandle = open("debug....
6,942
31.143519
107
py
ChromaStarPy
ChromaStarPy-master/VegaHalpha.py
# # #Custom filename tags to distinguish from other runs project = "Project" runVers = "Run" #Default plot #Select ONE only: #makePlot = "structure" #makePlot = "sed" makePlot = "spectrum" #makePlot = "ldc" #makePlot = "ft" #makePlot = "tlaLine" #Spectrum synthesis mode # - uses model in Restart.py with minimal str...
2,691
32.65
116
py
ChromaStarPy
ChromaStarPy-master/solartest.py
# -*- coding: utf-8 -*- """ Created on Wed Aug 30 10:54:21 2017 @author: ishort """ #plotting: import matplotlib import matplotlib.pyplot as plt #%matplotlib inline import pylab #General file for printing ad hoc quantities #dbgHandle = open("debug.out", 'w') #Get the data dataPath = "SolFluxAtlas2005/" #outPath = a...
6,253
28.780952
106
py
ChromaStarPy
ChromaStarPy-master/LineTau2.py
# -*- coding: utf-8 -*- """ Created on Sat Apr 29 15:33:20 2017 @author: Ian """ import math import Useful """ /* This might be the wrong approach - using the *local* monochromatic continuum optical depth and extinction * scale for reference at each wavelength - the alternative is to use a universal tau and kappa ...
8,909
42.043478
172
py
ChromaStarPy
ChromaStarPy-master/Dgesl.py
# -*- coding: utf-8 -*- """ Created on Mon May 6 11:42:29 2019 @author: """ import math import numpy #from scipy.linalg.blas import daxpy #from scipy.linalg.blas import ddot #from scipy.linalg.blas import dscal #from scipy.linalg.blas import idamax #from Documents.ChromaStarPy.GAS.blas.Daxpy import daxpy #from Docu...
5,968
31.440217
112
py
ChromaStarPy
ChromaStarPy-master/CSBlockData.py
# -*- coding: utf-8 -*- """ Created on Thu May 9 12:04:33 2019 @author: """ #Try this #global pi, sbcon, kbol, cvel, gcon, hpl, hmass, t0, everg #/consts/ global kbol, hmass, t0 #/consts/ global name, ip, comp, awt, nspec, natom, itab, ntab, indx, iprint, gsinit, print0 #/gasp/ global ipr, nch, nel, ntot, nat, zat,...
10,838
35.867347
123
py
ChromaStarPy
ChromaStarPy-master/ScaleT5000.py
# -*- coding: utf-8 -*- """ Created on Fri Apr 21 16:39:41 2017 /** * Initializes and re-scales a Phoenix LTE spherical reference model of * Teff=5000K, log(g)=4.5, [Fe/H]=0.0, xi=1.0 km/s, l=1.0H_p, M=1M_Sun, R=6.4761D+10cm * * @author Ian */ @author: ishort """ import math import ToolBox import Useful def ...
16,606
46.99711
121
py
ChromaStarPy
ChromaStarPy-master/LDC.py
# -*- coding: utf-8 -*- """ Created on Mon May 1 12:58:43 2017 @author: ishort """ #JB# import numpy as np from sklearn.metrics import r2_score #returns the "experimental" data #takes a coefficent episilon(lambda) and a cosine value. def func(coeff,ctheta): return(1-coeff+coeff*ctheta) #returns the mean^2...
2,694
27.072917
100
py
ChromaStarPy
ChromaStarPy-master/ScaleT4250g20.py
# -*- coding: utf-8 -*- """ Created on Fri Apr 21 16:39:41 2017 /** * Initializes and re-scales a Phoenix LTE spherical reference model of * Teff=4250K, log(g)=2.0, [Fe/H]=0.0, xi=1.0 km/s, l=1.0H_p, M=1M_Sun, R=6.4761e+10cm * * @author Ian */ @author: ishort """ import math import ToolBox import Useful def ...
17,414
44.708661
122
py
ChromaStarPy
ChromaStarPy-master/ScaleSolar.py
# -*- coding: utf-8 -*- """ Created on Fri Apr 21 09:59:40 2017 Routines to read in a standard solar atmosphere model computed with Phoenix V15 and calculate associated quantities. Needed for physical treatments normalized with solar qantities @author: ishort """ import math import ToolBox import Useful def phxSun...
17,041
51.76161
116
py
ChromaStarPy
ChromaStarPy-master/Daxpy.py
# -*- coding: utf-8 -*- """ Created on Fri May 17 15:38:28 2019 @author: """ import math """ *> \brief \b DAXPY * * =========== DOCUMENTATION =========== * * Online html documentation available at * http://www.netlib.org/lapack/explore-html/ * * Definition: * =========== * * SUBROUTINE DAXPY(N,DA,...
5,189
24.441176
90
py
ChromaStarPy
ChromaStarPy-master/Ddot.py
# -*- coding: utf-8 -*- """ Created on Fri May 17 17:11:14 2019 @author: """ import math """ *> \brief \b DDOT * * =========== DOCUMENTATION =========== * * Online html documentation available at * http://www.netlib.org/lapack/explore-html/ * * Definition: * =========== * * DOUBLE PRECISION FUNCT...
4,425
21.353535
77
py
ChromaStarPy
ChromaStarPy-master/ScaleT10000.py
# -*- coding: utf-8 -*- """ Created on Fri Apr 21 17:28:32 2017 Initializes and re-scales a Phoenix LTE spherical reference model of * Teff=10000K, log(g)=4.0, [Fe/H]=0.0, xi=1.0 km/s, l=1.0H_p, M=1M_Sun, R=1.1613E+11cm @author: ishort """ import math import ToolBox import Useful def phxRefTeff(): return 1000...
14,914
49.731293
121
py
ChromaStarPy
ChromaStarPy-master/CSGasData2.py
import BlockData global name, ip, comp, awt, nspec, natom, itab, ntab, indx, iprint, gsinit, print0 #/gasp/ global ipr, nch, nel, ntot, nat, zat, neut, idel, indsp, indzat, iat, natsp, iatsp #/gasp2/ ip = BlockData.ip comp = BlockData.comp awt = BlockData.awt name = BlockData.name ipr = BlockData.ipr nch = BlockData...
19,996
158.976
295
py
ChromaStarPy
ChromaStarPy-master/AtomicMass.py
# -*- coding: utf-8 -*- """ Created on Fri Apr 21 15:33:22 2017 //Atomic AND molecular masses in atomic mass units (amu. "mu") @author: ishort """ def getMass(elName): """//Atomic masses in atomic mass units (amu. "mu") //From CIAAW //Atomic weights of the elements 2015 ciaaw.org/atomic-weights.htm, Aug. 2...
3,547
16.564356
77
py
ChromaStarPy
ChromaStarPy-master/LamGrid.py
# -*- coding: utf-8 -*- """ Created on Thu Apr 20 16:33:44 2017 Create the wavelength grid that samples the overall spectral energy distribution @author: ishort """ import math def lamgrid(numLams, lamSetup): lambdaScale = [] logLambda = 0.0 #// Space lambdas logarithmically: logLam1 = mat...
631
20.066667
80
py
ChromaStarPy
ChromaStarPy-master/GsCalc.py
# -*- coding: utf-8 -*- """ Created on Thu May 9 10:09:02 2019 @author: """ # # #his module can serve as the main method # # #plotting: import matplotlib import matplotlib.pyplot as plt #%matplotlib inline import math import numpy #from scipy.linalg.blas import daxpy #from scipy.linalg.blas import ddot #from scipy...
10,658
22.426374
118
py
ChromaStarPy
ChromaStarPy-master/KappasRaylGas.py
# -*- coding: utf-8 -*- """ Created on Tue Apr 25 17:18:39 2017 @author: ishort """ import math import Useful import PartitionFn import ToolBox #import numpy #/* Rayleigh scattering opacity routines taken from Moog (moogjul2014/, MOOGJUL2014.tar) #Chris Sneden (Universtiy of Texas at Austin) and collaborators #http:/...
10,089
33.087838
149
py
ChromaStarPy
ChromaStarPy-master/AlfBooTiO516.py
# # #Custom filename tags to distinguish from other runs project = "Project" runVers = "Run" #Default plot #Select ONE only: #makePlot = "structure" #makePlot = "sed" makePlot = "spectrum" #makePlot = "ldc" #makePlot = "ft" #makePlot = "tlaLine" #Spectrum synthesis mode # - uses model in Restart.py with minimal str...
2,864
34.37037
132
py
ChromaStarPy
ChromaStarPy-master/GsCalcMaster.py
# -*- coding: utf-8 -*- """ Created on Thu May 9 10:09:02 2019 @author: """ # # #his module can serve as the main method # # #plotting: import matplotlib import matplotlib.pyplot as plt #%matplotlib inline import math import numpy #from scipy.linalg.blas import daxpy #from scipy.linalg.blas import ddot #from scipy...
8,875
24.287749
118
py
ChromaStarPy
ChromaStarPy-master/DepthScale.py
# -*- coding: utf-8 -*- """ Created on Wed Apr 26 16:10:24 2017 @author: ishort """ import math def depthScale(numDeps, tauRos, kappa, rho): """ /** * Returns vector of numDep linear geometric DEPTHS below top of atmosphere - in * cm (cgs) for consistency with log(g) units * */""" logE = math.log10...
2,903
34.851852
184
py
ChromaStarPy
ChromaStarPy-master/SunCaIIHK.py
# # #Custom filename tags to distinguish from other runs project = "Project" runVers = "Run" #Default plot #Select ONE only: #makePlot = "structure" #makePlot = "sed" makePlot = "spectrum" #makePlot = "ldc" #makePlot = "ft" #makePlot = "tlaLine" #Spectrum synthesis mode # - uses model in Restart.py with minimal str...
2,669
33.230769
116
py
ChromaStarPy
ChromaStarPy-master/Planck.py
# -*- coding: utf-8 -*- """ Spyder Editor This is a temporary script file. """ import math import Useful def planck(temp, lambda2): """ /** * Inputs: lambda: a single scalar wavelength in cm temp: a single scalar * temperature in K Returns log of Plank function in logBBlam - B_lambda * distribution in pu...
4,329
35.694915
104
py
ChromaStarPy
ChromaStarPy-master/RGBNaID.py
# # #Custom filename tags to distinguish from other runs project = "Project" runVers = "Run" #Default plot #Select ONE only: #makePlot = "structure" #makePlot = "sed" makePlot = "spectrum" #makePlot = "ldc" #makePlot = "ft" #makePlot = "tlaLine" #Spectrum synthesis mode # - uses model in Restart.py with minimal str...
2,669
32.797468
116
py
ChromaStarPy
ChromaStarPy-master/Convec.py
# -*- coding: utf-8 -*- """ Created on Thu May 11 14:40:19 2017 @author: ishort """ import math import Useful def convec(numDeps, tauRos, depths, temp, press, rho, kappa, kappaSun, zScale, teff, logg, mmw): logE = math.log10(math.E) #// for debug output ln10 = math.log(10.0) #//needed to convert...
10,216
44.008811
222
py
ChromaStarPy
ChromaStarPy-master/PPressPlot.py
# -*- coding: utf-8 -*- """ Created on Wed Aug 30 10:54:21 2017 @author: ishort """ #plotting: import matplotlib import matplotlib.pyplot as plt #%matplotlib inline import pylab from functools import reduce import subprocess import os import sys #General file for printing ad hoc quantities #dbgHandle = open("debug....
6,870
30.810185
107
py
ChromaStarPy
ChromaStarPy-master/IonizationEnergy.py
# -*- coding: utf-8 -*- """ Created on Mon Apr 24 17:12:02 2017 @author: ishort """ def getIonE(species): """// Ground state ionization energies in eV //From NIST Atomic Spectra Database //Ionization Energies Data """ #//Kramida, A., Ralchenko, Yu., Reader, J., and NIST ASD Team (2014). NIST Atomic Spectra Dat...
14,900
16.953012
246
py
ChromaStarPy
ChromaStarPy-master/Dscal.py
# -*- coding: utf-8 -*- """ Created on Fri May 17 16:20:21 2019 @author: """ import math """ *> \brief \b DSCAL * * =========== DOCUMENTATION =========== * * Online html documentation available at * http://www.netlib.org/lapack/explore-html/ * * Definition: * =========== * * SUBROUTINE DSCAL(N,D...
4,433
22.967568
80
py
ChromaStarPy
ChromaStarPy-master/LineListPy.py
# -*- coding: utf-8 -*- """ Created on Mon May 1 16:07:45 2017 @author: ishort /* * The MIT License (MIT) * * Copyright (c) 2016 C. Ian Short * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Sof...
23,868
37.685575
463
py
ChromaStarPy
ChromaStarPy-master/Idamax.py
# -*- coding: utf-8 -*- """ Created on Fri May 17 16:41:34 2019 @author: """ import math """ *> \brief \b IDAMAX * * =========== DOCUMENTATION =========== * * Online html documentation available at * http://www.netlib.org/lapack/explore-html/ * * Definition: * =========== * * INTEGER FUNCTION ID...
3,993
22.356725
80
py
ChromaStarPy
ChromaStarPy-master/MStarSpecTest.py
# -*- coding: utf-8 -*- """ Created on Wed Aug 30 10:54:21 2017 @author: ishort Compare arbitrary phoenix spectra to CSGPy spectra - mainly to "astrophyscially tune" molecular band oscillator strenths """ #plotting: import matplotlib import matplotlib.pyplot as plt #%matplotlib inline import pylab #From: https://...
7,356
26.973384
106
py