GithubHelp home page GithubHelp logo

brunosanchez / pysmp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from djbrout/pysmp

0.0 1.0 0.0 57.24 MB

Scene Modeling Pipeline for Sub Percent Transient Photometry

Python 97.71% Shell 0.09% C 0.93% Jupyter Notebook 1.24% Makefile 0.03%

pysmp's Introduction

pysmp v1.0

Knobs

Data Ingestion Knobs

Inside default.config

  • -r /path/to/topdir/of/images
  • --filter=g: Each filter is fit individually so you must specify your filter of interest
  • -p /path/to/default.param: discussed below
  • -o /path/to/outdir/for/smp
  • --snfilepath=/path/to/forced/photometry/smp/input/lightcurves: SMP requires forced photometry lightcurves as an input.
  • --nozpt: will always calculate the zeropoint of every image containin the SN ra and dec even if they already been calculated on a past run.
  • --usefake: if fakes are present in the image given by Kessler pipeline then this will handle them accordingling and propagate data for later analysis.
  • --bigstarcatalog=/path/to/big/star.cat
  • --snfilelist=/path/to/file/containing/all/forced/photometry/input/files.txt

Inside default.param

  • mjdplus: (mjd-peakmjd) larger than this value are fixed to zero SN flux (necessary for SMP)
  • mjdminus: (mjd-peakmjd) smaller than this value are fixed to zero SN flux (necessary for SMP)
  • HDR_AIRMASS_NAME: AIRMASS
  • HDR_PLATESCALE_NAME: PIXSCAL1
  • HDR_PSF_FWHM: PSF_FWHM
  • FORCERADEC: False
  • FRA: 40.514263
  • FDEC: -1.630960

MCMC Knobs

Inside default.param

  • --doremap: will use Galsim to remap the galaxy model to the WCS grid of each nights image (SLOW but recommended for final photometry).

Inside default.param

  • GALMODEL_PIXELATION_FACTOR: 2. # NO pixelation = 1.
  • SN_PLUS_GALMODEL_STEPS: 500000
  • SN_SHIFT_STD: 0.0001
  • SN_FLUX_PROPOSAL_MULT: 2. # Proposal STD is sqrt(diffim_flux)*SN_FLUX_PROPOSAL_DIV
  • GALMODEL_PROPOSAL_STD: .6

Doing a Fit

python smpshift.py --index=$1 --nozpt

Submit to your favorite batch grid system with each job containing a different --index=$1 .

Afterwards you will run the following command to regenerate lightcurves with SMP fluxes in a new directory! (dont overwrite old lightcurves!)

python addcoltoDESlightcurve.py --lcdir=/path/to/new/lc/files --resultsdir=/path/to/smp/results

Example output lightcurve file

Contains the original forced photometry lightcurve file structure with the addition of several columns

SMP_FLUX - fit flux (at zpt of 31)
SMP_FLUXERR - fit flux error (at zpt of 31)
SMP_FLUX_ZPT - zeropoint of smp flux (always 31)
SMP_FIT_ZPT - smp fit zeropoint which is used to scale all fluxes to 31
SMP_FIT_ZPT_STD - uncertainty in smp fit zeropoint which is used to scale all fluxes to 31
SMP_CHISQ - (sim_stamp - image_stamp)^2/(err)^2
SMP_SKY - fit value for the sky
SMP_SKYERR - uncertainty in the sky
SMP_FIX - 1 means SN flux was fixed to zero in smp fit
SMP_FLAG - 1 means this epoch was flagged for some reason inside smp pipeline

(just to be clear: ALL FLUXES, SKYS, SKYERRS, ETC... ARE REPORTED AT A ZEROPOINT OF 31)

-999 means missing data

pysmp's People

Contributors

djbrout avatar phillyheights avatar

Watchers

James Cloos avatar

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.