jeff-regier / Celeste.jl

Scalable inference for a generative model of astronomical images
MIT License
183 stars 28 forks source link

RawPSF -> AbstractPSFMap in Image #715

Closed kbarbary closed 6 years ago

kbarbary commented 6 years ago

This is a step in making the core of Celeste independent of the SDSS data model.

It Makes the Image type parametric in the last attribute (formerly called a RawPSF) which represents the rasterized PSF as a function of position in the image. Image can now contain any type of AbstractPSFMap, which has one job: to return a rasterized PSF model, given a pixel position. This allows for different implementations, such as SDSSPSFMap, or ConstantPSFMap (a non-varying PSF), or any other survey's PSF representation, without any of the rest of Celeste knowing the type or the implementation.

The alternative to this would be fitting a spatially variable version of Celeste's PSF model (Vector{PsfComponent}) and storing that in Image. (That would be cleaner in some ways and can of course still be done in the future.)

Note: most of the big blocks of changes here are simply moving code around: the SDSS specific PSF has moved to SDSSIO.jl for example.

codecov[bot] commented 6 years ago

Codecov Report

Merging #715 into master will increase coverage by 0.18%. The diff coverage is 94.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #715      +/-   ##
==========================================
+ Coverage   81.08%   81.26%   +0.18%     
==========================================
  Files          35       35              
  Lines        3643     3641       -2     
==========================================
+ Hits         2954     2959       +5     
+ Misses        689      682       -7
Impacted Files Coverage Δ
src/Synthetic.jl 68.88% <ø> (ø) :arrow_up:
src/ParallelRun.jl 82.92% <ø> (ø) :arrow_up:
src/joint_infer.jl 73.59% <ø> (ø) :arrow_up:
src/deterministic_vi/elbo_args.jl 100% <ø> (ø) :arrow_up:
src/model/image_model.jl 75% <ø> (ø) :arrow_up:
src/model/log_prob.jl 90.57% <ø> (ø) :arrow_up:
src/AccuracyBenchmark.jl 80.9% <100%> (-0.5%) :arrow_down:
src/model/imaged_sources.jl 100% <100%> (ø) :arrow_up:
src/model/psf_model.jl 100% <100%> (ø) :arrow_up:
src/SDSSIO.jl 93.92% <100%> (+0.29%) :arrow_up:
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ed67bca...c6bcb20. Read the comment docs.

jeff-regier commented 6 years ago

Awesome!