Code Monkey home page Code Monkey logo

weepeezee's Introduction

WeePeeZee

What this contains so far

  • The data folder contains subfolders that contain .sacc files with the power spectra and redshift distributions we used for the HSC paper. You can pretty much ignore all of them except for the data/COADD folder, which contains the data coadded over all fields.

  • The modules folder contains a bunch of code to compute theory predictions. Most of this is stolen from LSSLike. In particular, if you want to understand what's currently in LSSLike (although in a much more lightweight form, look at modules/theory_cls.py. The script theory_example.py shows how to compute the theoretical prediction for the angular power spectra given the inputs in a SACC file.

  • The script data_generator.py can create a simulated SACC file that contains

    • a) N(z)s made up of a smooth mean + some Gaussian fluctuations.
    • b) Power spectra made up of the true power spectra (corresponding to the true underlying parameters and smooth N(z)) + noise coming from the covariance matrix (i.e. a Gaussian realization of the power spectra).

    The script will save these files into a folder within the data folder with whatever name you want. To run it, type

    python data_generator.py <sim_name> <save_mean> <n_svd>
    

    where sim_name is the name of the folder where you want to save the results, save_mean is either 0 or 1, and governs whether you want to save an additional SACC file with the true power spectra and N(z)s, and n_svd is the number of principal eigenvalues you want to use when generating the random N(z)s. For now set that to 4.

weepeezee's People

Contributors

boryanah avatar slosar avatar damonge avatar

Stargazers

 avatar

Watchers

 avatar  avatar

weepeezee's Issues

What should the data N(z) be?

Currently, to get the prior on N(z), we set the mean to the average of the COSMOS-30-band N(z) and the N(z)s from the different photo-z stacks (see here). I think this should just be the COSMOS-30band N(z), since the CV covariance we use corresponds to the COSMOS-30band sample.

Check `get_theory`

We should check that the get_theory function here produces the same predictions as the one used in LSSLike.

Quick code review

OK, I've had a look at the current code. Here are a few coments:

  • In calculate_smooth_s_and_prior.py:
    • We should remember here that the "data" N(z) is the mean of COSMOS N(z) and the photo-z stacks. I think this should just be the COSMOS, but let's leave it as it is and fight it out later. I've opened an issue about this (#1).
    • Can you explain what's going on here and on the next line? It seems like you're assigning all elements the same noise.
    • I have looked briefly over the functions compute_covmat_cv an obtain_smoothing_D, but I haven't checked the formulas. It'd be good to write the formulas used for both of them in the notes so we don't have to rederive them every time. I've open an issue so we don't forget (#2).
    • Can you remind me what the motivation for the specific choice of A_smooth is here?
    • Could you make a plot that shows: a) the COSMOS N(z), b) The N(z)s for the different photo-z codes, c) The error bars associated to P0 and d) The smoothed-out version of N(z) (s_0 in the notes). This is just to get an idea of how all of this looks right now.
    • It's fine for now, but at some point we should add the cross-bin CV covariance here. I've opened an issue (#3).
    • On this line, the following would be faster, because matrix-vector products and equation solving are faster than matrix-matrix products and matrix inversions respectively (although this is probably not a problem in this case):
s_smooth = np.linalg.solve(P0+D, np.dot(P0, s0))
  • In create_sacc.py:
    • You should delete this line, right?
    • Have we checked that get_theory is roughly OK? I.e. that it reproduces the same theory curves that the likelihood does? Have we plotted it against the data? I know I coded this up, and checked it roughly, but it would be good to have someone else's eyes on it. Possibly not an urgent issue, so I've opened a separate isue (#4).
    • Have we checked that the numerical derivative we use for Tmat here is roughly converged?

N(z) covariance formulas

Could we write the equations for the cosmic variance and smoothness contributions to the N(z) covariance in the notes?

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.