Attention: if you attempt to fork this gist, github will think that you are a spammer and you will have to confirm that you are human with them. Apparantly there are too many links in this list. Also I update it rather frequently (see revisions on the left), so it's probably wise to not fork it anyway.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
csr-dyn-76:MOOG2011_SCAT andycasey$ make -f Makefile.mac | |
g77 -w Abfind.o Abpop.o Abunplot.o Batom.o Begin.o Binary.o Binplot.f Binplotprep.o Blends.o Bmolec.o Boxit.o Calmod.o Cdcalc.o Chabund.o Cog.o Cogplot.o Cogsyn.o Correl.o Cross.o Curve.o Damping.o Defcolor.o Discov.o Doflux.o Drawcurs.o Eqlib.o Estim.o Ewfind.o Ewweighted.o Fakeline.o Findtic.o Finish.o Fluxplot.o Gammabark.o Getasci.o Getcount.o Getnum.o Gridplo.o Gridsyn.o Infile.o Inlines.o Inmodel.o Invert.o Isotope.o Jexpint.o Lineinfo.o Linlimit.o Makeplot.o Minimax.o Moog.o Mydriver.o Nansi.o Nearly.o Number.o Obshead.o Oneline.o Opaccouls.o OpacHelium.o OpacHydrogen.o Opacit.o Opacmetals.o Opacscat.o Params.o Partfn.o Partnew.o Plotit.o Plotremember.o Pltabun.o Pltcog.o Pltflux.o Pltspec.o Pointcurs.o Prinfo.o Putasci.o Readobs.o Rinteg.o Smooth.o Specplot.o Stats.o Sunder.o Synpop.o Synspec.o Synth.o Taukap.o Total.o Trudamp.o Ucalc.o Vargauss.o Vmacro.o Voigt.o Wavecalc.o Weedout.o Writenumber.o Sourcefunc_scat_cont.o AngWeight.o Sourcefunc_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# makefile for MOOG with all of the common block assignments; | |
# this is for a mac machine | |
# here are the object files | |
OBJECTS = Abfind.o Abpop.o Abunplot.o Batom.o Begin.o Binary.o \ | |
Binplot.f Binplotprep.o Blends.o Bmolec.o Boxit.o \ | |
Calmod.o Cdcalc.o Chabund.o Cog.o Cogplot.o Cogsyn.o \ | |
Correl.o Cross.o Curve.o Damping.o Defcolor.o Discov.o \ | |
Doflux.o Drawcurs.o Eqlib.o Estim.o Ewfind.o \ | |
Ewweighted.o Fakeline.o Findtic.o Finish.o \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
csr-dyn-76:MOOG2011_SCAT andycasey$ make -f Makefile.mac | |
g77 -w -lg2c -lm -lblas -llapack -lgfortran Abfind.o Abpop.o Abunplot.o Batom.o Begin.o Binary.o Binplot.f Binplotprep.o Blends.o Bmolec.o Boxit.o Calmod.o Cdcalc.o Chabund.o Cog.o Cogplot.o Cogsyn.o Correl.o Cross.o Curve.o Damping.o Defcolor.o Discov.o Doflux.o Drawcurs.o Eqlib.o Estim.o Ewfind.o Ewweighted.o Fakeline.o Findtic.o Finish.o Fluxplot.o Gammabark.o Getasci.o Getcount.o Getnum.o Gridplo.o Gridsyn.o Infile.o Inlines.o Inmodel.o Invert.o Isotope.o Jexpint.o Lineinfo.o Linlimit.o Makeplot.o Minimax.o Moog.o Mydriver.o Nansi.o Nearly.o Number.o Obshead.o Oneline.o Opaccouls.o OpacHelium.o OpacHydrogen.o Opacit.o Opacmetals.o Opacscat.o Params.o Partfn.o Partnew.o Plotit.o Plotremember.o Pltabun.o Pltcog.o Pltflux.o Pltspec.o Pointcurs.o Prinfo.o Putasci.o Readobs.o Rinteg.o Smooth.o Specplot.o Stats.o Sunder.o Synpop.o Synspec.o Synth.o Taukap.o Total.o Trudamp.o Ucalc.o Vargauss.o Vmacro.o Voigt.o Wavecalc.o Weedout.o Writenumber.o Sourcefun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
csr-dyn-76:MOOG2011_SCAT andycasey$ gfortran -o Abfind.o -L. Abfind.f -lX11 -lplotsub -ldevices -lutils -L/usr/X11R6/lib | |
ld: warning: in /usr/local/lib/libplotsub.a, file was built for unsupported file format which is not the architecture being linked (i386) | |
ld: warning: in /usr/local/lib/libdevices.a, file was built for unsupported file format which is not the architecture being linked (i386) | |
ld: warning: in /usr/local/lib/libutils.a, file was built for unsupported file format which is not the architecture being linked (i386) | |
Undefined symbols: | |
"_fakeline_", referenced from: | |
_abfind_ in ccvIy6je.o | |
"_stats_", referenced from: | |
_abfind_ in ccvIy6je.o | |
"_pltabun_", referenced from: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sr-dyn-76:MOOG2011_SCAT andycasey$ export LDPATH=/usr/local/share/libplot | |
csr-dyn-76:MOOG2011_SCAT andycasey$ export LDD=/usr/local/share/libplot | |
csr-dyn-76:MOOG2011_SCAT andycasey$ export LD_LIBRARY_PATH=/usr/local/share/libplot | |
csr-dyn-76:MOOG2011_SCAT andycasey$ export LD_PATH=/usr/local/share/libplot | |
csr-dyn-76:MOOG2011_SCAT andycasey$ gfortran -arch i386 -o Abfind.o -L. Abfind.f -lX11 -lplotsub -ldevices -lutils -L/usr/X11R6/lib -L/usr/local/share/libplot/ | |
ld: warning: in /usr/local/lib/libplotsub.a, file was built for unsupported file format which is not the architecture being linked (i386) | |
ld: warning: in /usr/local/lib/libdevices.a, file was built for unsupported file format which is not the architecture being linked (i386) | |
ld: warning: in /usr/local/lib/libutils.a, file was built for unsupported file format which is not the architecture being linked (i386) | |
Undefined symbols: | |
"_fakeline_", referenced from: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
periodic_table = """H He | |
Li Be B C N O F Ne | |
Na Mg Al Si P S Cl Ar | |
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr | |
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe | |
Cs Ba Lu Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn | |
Fr Ra Lr Rf Db Sg Bh Hs Mt Ds Rg Cn UUt""" | |
lanthanoids = "La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb" | |
actinoids = "Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from numpy import arange | |
from math import fractorial | |
def calculate_interstellar_extinction(Na_D_equivalent_width, num_terms=100, precision=0.01): | |
"""Calculates interstellar extinction from the strength of the Na D1 line | |
at 5889.95 \AA based on the relationship found by Munari & Zwitter (2006).""" | |
alpha, err_alpha = 0.354, 0.01 | |
beta, err_beta = 11.0, 1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mrmagoo:smh andycasey$ python -c 'import json;import numpy as np;a=np.arange(5);b=a.tolist();c=list(a);print b,c,b==c;print json.dumps(b);print json.dumps(c)' | |
[0, 1, 2, 3, 4] [0, 1, 2, 3, 4] True | |
[0, 1, 2, 3, 4] | |
Traceback (most recent call last): | |
File "<string>", line 1, in <module> | |
File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/json/__init__.py", line 231, in dumps | |
return _default_encoder.encode(obj) | |
File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/json/encoder.py", line 201, in encode | |
chunks = self.iterencode(o, _one_shot=True) | |
File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/json/encoder.py", line 264, in iterencode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm on OS X 10.6.8 and I just installed cmake 2.8.11.2. Following the instructions on https://phantompy.readthedocs.org/en/latest/install.html#get-the-code, this is what I got: | |
mrmagoo:build andycasey$ cmake .. | |
-- The C compiler identification is GNU 4.2.1 | |
-- The CXX compiler identification is GNU 4.2.1 | |
-- Checking whether C compiler has -isysroot | |
-- Checking whether C compiler has -isysroot - yes | |
-- Checking whether C compiler supports OSX deployment target flag | |
-- Checking whether C compiler supports OSX deployment target flag - yes | |
-- Check for working C compiler: /usr/bin/cc |
OlderNewer