rbiswas4 / analyzesn Goto Github PK
View Code? Open in Web Editor NEWA repository with codes for supernova data analysis
License: MIT License
A repository with codes for supernova data analysis
License: MIT License
It has been unclear how to setup the environment variable THROUGHPUTS_DIR
in Windows. Also, in fliters.py
using os.getenv
twice needs to be avoided.
Add the lsst throughputs directory to install and setup.
In order for fits to work with LSST, we need the LSST throughputs. This is available from the lsst sims stack, but also through using the throughputs repository
lightcurve.py
and aliases.py
module from SNSims
repository to this repository.SNANASims.get_SNANA_photometry
return an instance of LightCurve
. This involves making sure the correct minimal columns are provided.infer_params
is a method we are using in pipeline scripts. It would be good to transfer this into the analyzeSN package.
snanaio.py
lsstu
rather than lsst_u
remap_filters
is applied so that it creates a dictionary with keys in lower case, for comparison where ignore_case==True
The magnitude histogram and the redshift distribution plot shown in JLA_example.ipynb in line 18 and 19 are different from the ones shown in example notebook when I run it on my computer (Mac OS 10.9.5) with sncosmo version 1.4.0
The histogram I get is here, and the histogram shown in the example notebook is here.
note: This includes prior on redshift.
We need to a. register the megacam filters from the throughputs directory in the same way as LSST filters. This is important partly because the examples stored are SNLS supernovae.
We need a way to prevent SNANASims from defaulting to use LSST throughputs.
There should be a script to combine the installs from conda and pip to produce a combined requirements document.
Running reschar.mu_variance_linear() in the example notebook gives an AttributeError "AttributeError: 'Series' object has no attribute 'ix'"
There are two issues to sort through:
i
and a i2
band. For SN from SNLS 3 year data, what we care about is the i
band rather than the newer i2
band.Allow input of SALTFormat
datasets using a class method for LightCurve
Class.
megacamg
and lsstg
simdata = ans.SNANASims.fromSNANAfileroot('LSST_Ia',
location='MINION_1016_10YR_DDF_v2/',
coerce_inds2int=True)
simdata.get_SNANA_photometry(snid=13)
raises
172 assert np.shape(ptrs) == (2,)
173 elif snid is not None:
--> 174 ptrs = self.get_photrows(snid=snid.strip().lower())
175 else:
176 raise ValueError('Both {0} and {1} cannot be None'
AttributeError: 'int' object has no attribute 'strip'
where the method assumes that snid
is a string.
The LightCurve
class reads in the bandpass as strings which could be 'ugrizy'. However, it might be that we need the strings to be aliased for certain programs to function. For example filters
module imports lsst filters using the registered throughputs lsst_u
, lsst_g
etc. We should have a method of taking care of this.
Allow for having a double gaussian which can be imported by SNsims.
Add the megacam filters to throughputs in the same way as LSST filters are added
In analyzeSN/aliases.py
iteritems
is used which is not compatible with python 3 use items
instead
@djreiss has a parser for old SNANA ASCII data (gzipped) and it would be good to split the parsing methods for SNANA to use this.
Currently, LightCurve
cannot accept column aliases, and works with its set of aliases. Add the ability to add a column alias in the form of a dictionary.
While using the lsst bandpasses from THROUGHPUTS
, we have added an approximate_bandpass
directory that removes zeros making it possible to use finite range spectra like the SALT model at different redshifts more easily. The filters.py
code importing the locations and registering bandpasses should be changed to take advantage of these.
Demonstrate the usage of LightCurve class using SNANASims as an example.
Figure out how to output verbatim strings. Or change this to a python script.
In partticular the current script tries to interpret bash variables like $HOME
which I want to write out verbatim. Another major problem is that the markdown code block syntax
is not being echoed correctly .
In order to write the results in ResChar
to disk, we should have methods for serializing these results. Obviously, all of the results are not calculated in every method. But there are a minimal number which will work on every successful run. We need to have methods for converting these into arrays suitable for storage as a flat array of floats. The list of such quantities includes:
x0
, x1
, c
, t0
alpha
and beta
. In principle, this cannot be obtained from a single supernova, but we can assume values of alpha
and beta
.The two problems are:
_lightcurve
attribute is changed by the remap_filters
function. This means that the second time we call lightCurve
it tries to use remap_filters on _lightcurve
and fails.
in #8 , we created a copy of _lightcurve
in lightCurve
. This means that everytime lightCurve
is called a new copy of _lightcurve
will be created. This should not result in larger memory as by this time the previous copy can be deleted. However, this may turn out to be inefficient particularly in MCMC sampling.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.