GithubHelp home page GithubHelp logo

analyzesn's People

Contributors

maddic9 avatar rbiswas4 avatar rmurphy5 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

analyzesn's Issues

Using `THROUGHPUTS_DIR` in Windows

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 throughputs to install and requirements

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

  • Investigate if it is better to conda install the throughputs directory and set it up through eups or it is better to git clone/curl in the throughtputs from the git repository and add a environment variable
  • Either way, use a setup.sh script to allow the user to set the throughputs directory. This way, the user having the throughputs directory already is not forced to download it again.

Fix imports

  • fix import in snanaio.py
  • fix the new names of registered LSST bands lsstu rather than lsst_u
  • fix the way remap_filters is applied so that it creates a dictionary with keys in lower case, for comparison where ignore_case==True

JLA_example.ipynb does not produce the output shown

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.

SNANASims automatically defaults to LSST

  1. 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.

  2. We need a way to prevent SNANASims from defaulting to use LSST throughputs.

Parameters array has no ".ix"

Running reschar.mu_variance_linear() in the example notebook gives an AttributeError "AttributeError: 'Series' object has no attribute 'ix'"

Add megacam throughputs

There are two issues to sort through:

  • The official megacam filters have an 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.
  • radial dependence of the bandpasses: This will be implemented in SNCosmo. Till then I was thinking about matching up SN for their positions as was done in SNANA. However, I am unsure of how different epochs find the same set of radial positions, unless the dithers in SNLS were small compared to the gradient of the transmission values.

Allow SALT Format

Allow input of SALTFormat datasets using a class method for LightCurve Class.

  • Add class method for using a SALT Format
  • Change the use of megacam /lsst filters so that it follows the same pattern as sdss ie. register the filters by names like megacamg and lsstg
  • Allow methods
  • Do examples

SNANASims with `coerce_inds2ints=True` has failueres

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.

Remap filters to solve SNANA issues

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.

Add ability to pass in column aliases

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.

Use approximate_bandpasses from `throughputs` directory

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.

Fix the generator script for documentation

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 .

Add utilities to convert `ResChar` to numerical values for serialization

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:

  • parameter values for at least x0, x1, c, t0
  • covariances : we need to store the upper triangular parts only. And we need to order the variables correctly.
  • An (under) estimate of the uncertainty on the distance modulus where we choose standard values of alpha and beta. In principle, this cannot be obtained from a single supernova, but we can assume values of alpha and beta.

Investigate possible inefficiency usage and fix it

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.

  • Investigate if this is a problem by profiling
  • Use a version of lazy property to fix this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.