Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
452 commits
Select commit Hold shift + click to select a range
88f62f8
add sn_stacker in sn_tools
pgris Jan 26, 2023
5596614
add a config flie for the script aiming at testing the sim_to_fit pro…
pgris Jan 26, 2023
af1c958
realistic FP as default
pgris Jan 27, 2023
6f938db
add two csv files as input to the script parametres
pgris Jan 27, 2023
354c960
removed some print
pgris Jan 30, 2023
072888f
code update
pgris Jan 30, 2023
30dfa56
code cleaning
pgris Jan 31, 2023
a466169
remove old dependencies (mean_wavelength from gamma file)
Jan 31, 2023
438d504
code tuning
pgris Jan 31, 2023
b0cfd0a
bug correction
pgris Jan 31, 2023
ef193b7
bug correction when overlapping pixels between fields
pgris Feb 1, 2023
6895d58
code protection when obs are not found for DDFs
pgris Feb 6, 2023
be38300
changed batch parameters: -n to --cpus-per-task
pgris Feb 6, 2023
7dabf37
add a method to display pixels to FP matching
pgris Feb 8, 2023
ceff06e
add seasonal selection for obs to increase speed in case of seasonal …
pgris Feb 8, 2023
79fc28f
bug correction when getting observations
pgris Feb 9, 2023
42d13f5
code update in FP2pixels
pgris Feb 9, 2023
53526e5
bug correction when dumping empty df
pgris Feb 10, 2023
704e14e
removed some printing
pgris Feb 10, 2023
223797a
add estimation of the total number of visits per band
pgris Feb 10, 2023
bddc4d0
bug correction when estimating seasons
pgris Feb 10, 2023
e7059f2
add a class to read LC according to metaFile
pgris Feb 10, 2023
a1f7e50
removed finish - no more necessary with recent modifs of sn_simulation
pgris Feb 13, 2023
17f9511
add list as possible output of multiproc class
pgris Feb 13, 2023
4ef4698
add nproc param for multiprocessing
pgris Feb 13, 2023
3802d61
print the number of pixels to process
pgris Feb 14, 2023
db86fc5
add a ebvofMW_pixel parameter to filter pixels depending on ebv
pgris Feb 15, 2023
5081e68
add a function to estimate E(B-V) per pixel
pgris Feb 15, 2023
7cf8e94
add pixels filtering depending on E(B-V)
pgris Feb 15, 2023
53a732f
pep8 applied
pgris Feb 16, 2023
a3b39ab
add a conda_activate parameter to activate conda when running
pgris Feb 16, 2023
ed4e08a
bug correction
pgris Feb 16, 2023
fe87977
adjust a job parameter
pgris Feb 20, 2023
25d919e
code protection when len(obs)==0 in simuparams
pgris Feb 20, 2023
0617734
mem cleaning when pixel processing done
pgris Feb 27, 2023
2044a60
add function to access SN and simu metadat in an easier way
pgris Mar 3, 2023
d94805f
add healpixID as key for multiple metadata table
pgris Mar 3, 2023
ed049db
some cleaning
pgris Mar 10, 2023
c6424f4
add the possibility to include u-obs for low moonPhases
pgris Mar 29, 2023
b0b9735
add m5 for y-band (missing)
pgris Apr 6, 2023
08f2053
add simu parameters
pgris Apr 11, 2023
da45b3c
add some parameters
pgris Apr 14, 2023
b0d75f6
add a method to compensate from Moon effect
pgris Apr 14, 2023
91e376b
add a note col to be compatible with fbs data
pgris Apr 27, 2023
fab5840
some modifs to include the note col
pgris Apr 27, 2023
a417e99
code cleaning
pgris Apr 28, 2023
a0d5922
modifs due to the fact that Fakes have now a note column
pgris Apr 28, 2023
b70f3e0
bug (not completely understood - related to pandas df and mem) correc…
pgris Apr 28, 2023
de65796
add nproc_fit as param
May 3, 2023
2fa28ec
add a parameter to use obs condition from simulation
pgris May 12, 2023
380ef97
modifs to use obs condition from simulation
pgris May 12, 2023
2dec2ca
add a parameter to use obs condition from simulation
pgris May 12, 2023
701fa0c
set NSNabsolute to 1
pgris May 12, 2023
eb1fb5a
code update to ease use
pgris May 15, 2023
f4e7bcd
add a filed as parameter
pgris May 15, 2023
c3aa03e
set m5 input to str to allow for list
pgris May 17, 2023
973627c
code update
pgris May 17, 2023
62ec2d5
typo corrections
pgris May 22, 2023
425dad3
FP default: circular
pgris May 25, 2023
af5b06e
bug correction in nights estimation
pgris May 25, 2023
0482a30
do not select_zone for DDF - use note instead
pgris May 25, 2023
a4cc30e
typo corr
pgris Jun 5, 2023
9a919a8
start defining a combined rate from existing rates
Jun 11, 2023
fbec6f1
add combined rate=Ripoche and Perrett
pgris Jun 12, 2023
4ef6c37
removed some print
pgris Jun 12, 2023
f8823e6
add more parameters for flexibility
pgris Jun 22, 2023
e05fe6b
add Hounsell rate
pgris Jun 23, 2023
ca6aecb
some cleaning
pgris Jul 3, 2023
423335c
code cleaning
pgris Jul 10, 2023
721ab8f
some correction related to the output
pgris Jul 10, 2023
0137516
add Candels SNe Ia rate taking into account the Start Formation Rate …
pgris Aug 29, 2023
dd1d76e
bug correction in Candels rate error
pgris Aug 29, 2023
c60ece9
code update when calling for sn_rate
pgris Sep 1, 2023
b13a8d2
add some code protection
pgris Sep 1, 2023
9357bee
decrease season_gap to 40 days
pgris Sep 1, 2023
d3bd42d
season gap increased to 50 days
Sep 5, 2023
1e6bf8c
bug correction for WFD
Sep 5, 2023
385e976
typo corr
Sep 6, 2023
31b9b75
run on a list of pixels only if required
Sep 6, 2023
3801bb1
fully implement the possibility to include an external obs condition …
pgris Sep 12, 2023
46036b4
bug correction
pgris Sep 13, 2023
87632f4
bug correction
pgris Sep 13, 2023
f8c42f5
simplified and debugged
pgris Sep 14, 2023
dd8a533
update: add cols plus code
pgris Sep 14, 2023
ec2af72
add new parameters
pgris Sep 15, 2023
388b518
recode makeFake to make it easier to understand/maintain
pgris Sep 15, 2023
4a1268a
bug correction
pgris Sep 15, 2023
0182b20
add obs_conditions (interp) as input of the class (to avoid multiple …
pgris Sep 18, 2023
99c29f9
simplified and faster to run
pgris Sep 25, 2023
7c80ed8
add force_calc option in season calc
pgris Sep 27, 2023
af9dbea
code cleaning
pgris Sep 27, 2023
8253b03
bug correction
pgris Oct 2, 2023
1a01907
some modifs in multiproc to account for tuple production in multiproc…
pgris Oct 12, 2023
7d55f05
code update: copy file from the web in the directory you want (not ne…
pgris Nov 28, 2023
47fa12e
add the possibility to correct for colnames in pandas df
pgris Dec 4, 2023
486aa61
removed the correction of columns- should be done elswhere
pgris Dec 4, 2023
38cb2e6
add --partition=lsst,htc as batch option
pgris Dec 6, 2023
a5c73ff
removed partition= for batch scripts
pgris Dec 7, 2023
78eb98e
update
pgris Dec 7, 2023
a9ab46c
update
pgris Dec 7, 2023
7ecd457
add a lookup table for DDFs
pgris Dec 11, 2023
ced945a
update the finish method
pgris Dec 11, 2023
5471f89
parameter tuning
pgris Dec 21, 2023
83442aa
extract two functions to make and analyze clusters of data
pgris Dec 21, 2023
7834223
code update
pgris Dec 21, 2023
a028286
code protection
pgris Dec 22, 2023
46a135e
add two parameters to avoid biases in nsn estimation from rate
pgris Feb 5, 2024
415bba9
remove debug comment
pgris Feb 7, 2024
e12ded6
add utility scripts to plot pixels in Mollweide view
pgris Feb 7, 2024
db71b4c
tuning
pgris Feb 9, 2024
293664d
add scripts following code reshuffling
pgris Apr 3, 2024
2b04cb5
use dbNamePlot for dbName on plot
pgris Apr 3, 2024
7c30e85
bug correction
pgris Apr 3, 2024
dcdf727
code update
pgris Apr 4, 2024
a1ead04
update
pgris Apr 5, 2024
5f79cf6
update
pgris Apr 12, 2024
f42c28c
update on collections/MutableMapping
pgris Apr 16, 2024
a68a44e
add a function to estimate N(z)
pgris May 7, 2024
4b94590
cleaning
pgris May 22, 2024
af60c6d
change the way of simulating the redshifts to account for the rate shape
Jun 13, 2024
7be5436
save old way of estimating zdist
Jun 16, 2024
a734961
add constrain batch param to run on el7 or el9
pgris Jun 20, 2024
90836a1
bug correction: np.float -> float
pgris Jul 3, 2024
fbf19f9
add account_for_edges=True for SN num estimation
pgris Jul 19, 2024
19f33bc
add a script with FP and pixels classes and functions
Sep 11, 2024
cbffd7e
some cleaning
Sep 11, 2024
4a324c4
implementing new soft following new FP model
pgris Sep 12, 2024
bf41a71
add param for code (old/new) usage
pgris Sep 13, 2024
183ac13
add script to select data in a (RA,Dec) window
pgris Sep 13, 2024
92322ea
cleaning
pgris Sep 13, 2024
ee0f0bc
account_for_edges=False in simu params estimation
pgris Sep 13, 2024
08623b1
add a new sn process to improve the code
pgris Sep 13, 2024
1fbbe49
remove the el constraint for batch
pgris Sep 13, 2024
8e9b7c9
code update to account for changes in the db colnames (note->schedule…
pgris Sep 18, 2024
41bd797
modif to account for a new class
pgris Sep 23, 2024
8bad7f9
made a generic finish method using hasattr
pgris Sep 23, 2024
6625cf7
trying to improve speed
pgris Sep 23, 2024
7766404
update to remove corner rafts
pgris Sep 24, 2024
6dc1fab
cleaning
pgris Sep 24, 2024
e667618
implement multiprocessing correctly
pgris Sep 24, 2024
441869a
bug correction in metric.finish: use hasattr(metric, finish) to solve it
pgris Sep 24, 2024
d3e1f2d
some tuning
pgris Sep 25, 2024
2f54b75
bug correction
pgris Sep 25, 2024
f596701
add some input parameters related to RACol,DecCol, filterCol
pgris Sep 26, 2024
f3de1b0
code update
pgris Sep 26, 2024
f4aebf7
update docstring
pgris Sep 27, 2024
d85a23a
commented batch options related to task
pgris Oct 14, 2024
04c2aaa
set discrete colors fo the surveys
pgris Nov 7, 2024
848c132
code update
Nov 20, 2024
71e513b
add xticklabel in plot_pixels
pgris Jan 8, 2025
3b22f02
adapt code
pgris Jan 9, 2025
b41b787
add scrpits to plot pixels
pgris Jan 28, 2025
5a84a34
add a register_bands_sncosmo to have common code between LC generatio…
pgris Feb 7, 2025
c352d48
update
pgris Feb 10, 2025
f069b59
bug correction
Feb 10, 2025
cd94b23
bug correction when concatenating obs with FP info (raft,ccd)
Feb 10, 2025
b56afdb
bug correction
pgris Feb 11, 2025
f3252ae
update+cleaning
pgris Feb 11, 2025
6145d36
update
pgris Feb 11, 2025
fa91e21
add requirements.txt
pgris Feb 11, 2025
fba7d04
update
Feb 12, 2025
f0595bc
code update following changes in OS db names
pgris Feb 13, 2025
d747b29
cleaning
pgris Feb 13, 2025
90924df
update and cleaning
pgris Feb 13, 2025
0b87dea
update following some changes in OS db structure
pgris Feb 14, 2025
3d9b510
some improvement in getting the pixels
pgris Mar 18, 2025
1b9abe1
add a load script for SN data
pgris Mar 21, 2025
e490715
add a script to convert str to list
pgris Mar 21, 2025
f093f3a
add sn_rate vs z for the NSN_absolute mode
pgris Mar 24, 2025
622a19b
code protection
pgris Mar 25, 2025
67c2688
update
pgris Mar 25, 2025
2358866
bug correction
pgris Mar 26, 2025
f0a6f5b
add some doc
pgris Apr 3, 2025
3b9f8f3
modif to remove Roman field DD: RGS... from the WFD survey
pgris Apr 3, 2025
fa8d0eb
bug correction in simuparameters
pgris Apr 24, 2025
fa1b198
bug correction
pgris Apr 24, 2025
cb925ca
code cleaning in distmax simu param estimation
pgris May 16, 2025
53fb75e
add the possibility to load a postgresql db for observations
pgris Jun 3, 2025
f0fe1b5
add the noteCol parameter to get the field name
pgris Jun 16, 2025
e81bc3e
add a flexible way of defining sncosmo bands
pgris Jul 3, 2025
ea9518a
cleaning and update
pgris Jul 4, 2025
d4cfde1
oz->ozone
pgris Jul 4, 2025
84a6c7a
update
pgris Jul 16, 2025
f420467
add a generic load_config function to load yaml files
pgris Jul 18, 2025
9772408
improve the cosmo model to estimate sn_rate
pgris Aug 26, 2025
66c0d2f
add a class to estimate in an easy way the pixel list inside the Foca…
pgris Sep 5, 2025
bc15cc2
add required package list in setup.py
pgris Sep 9, 2025
6a0323c
add required package list in setup.py
pgris Sep 9, 2025
e31fd15
add pyproject.toml for comp^liance qith recent pip version
pgris Sep 16, 2025
293d861
add a clean_level script
pgris Sep 16, 2025
4f305bb
adapt code for v5.0.0 simulations
pgris Sep 25, 2025
03c4196
adapt the code because of DDF changes in v5 simulations
pgris Sep 25, 2025
3035de2
add a function to grab fields independently on the OS version; code u…
pgris Sep 26, 2025
3f08f9b
add a common get_fields function supposed to be compliant with OS ver…
pgris Sep 26, 2025
4cf6e62
update following updates in sn_obs
pgris Sep 26, 2025
a31f864
bug correction
pgris Sep 26, 2025
d371deb
update
pgris Sep 30, 2025
d23a293
add the total number of pointings
pgris Sep 30, 2025
0dac12d
typo corr
pgris Oct 1, 2025
5e2c6ce
rewrite the get_fields method to make it faster
pgris Oct 1, 2025
427e76d
add multiprocessing on pixels
pgris Oct 2, 2025
d09cbec
add info for field/season
pgris Oct 15, 2025
038fe82
bug correction
pgris Oct 15, 2025
00d4c86
bug correction when estimating the dithering per night
pgris Oct 23, 2025
c95a81c
add common function to build interactive scripts
pgris Dec 9, 2025
80d4d26
add lc coadd script
pgris Dec 18, 2025
fa3ec3e
code cleaning
pgris Dec 18, 2025
ed0cd51
add snr_min selection in coadd
pgris Dec 19, 2025
97ab2a2
update
pgris Dec 19, 2025
a0e9b91
code protection
pgris Jan 5, 2026
1e3599f
import multiprocessing inside the multiproc function
pgris Jan 6, 2026
777fa00
add generic load_season function
pgris Jan 6, 2026
4cff615
tuning
pgris Jan 9, 2026
a648001
update
pgris Jan 13, 2026
948563e
update
pgris Jan 14, 2026
19e92d5
add a wrapper class to estimate SN simu parameters
pgris Jan 15, 2026
a0267ff
add a simple function usefull to test multiprocessing
pgris Jan 15, 2026
2975302
no SNR cut before lc coadd
pgris Jan 16, 2026
ad317fd
some tuning+bug corr
pgris Jan 16, 2026
362c2c5
update
pgris Jan 22, 2026
af3df04
cleaning
pgris Feb 7, 2026
da8791f
add a script for custom cosmo models
pgris Feb 26, 2026
4e8f285
update
pgris Feb 26, 2026
7e2875b
update and cleaning
pgris Feb 27, 2026
8976dc2
update
pgris Mar 2, 2026
f5e462d
update and cleaning
pgris Mar 3, 2026
d1b84aa
tuning
pgris Mar 4, 2026
15c4179
remove comment
pgris Mar 4, 2026
5c21517
modif astropy healpix version
pgris Mar 6, 2026
b5f6fc9
update
pgris Mar 6, 2026
f6c93c3
update to account for new telmodel+implement multiprocessing
pgris Mar 6, 2026
2b38c16
add a script to chose SNe Ia bands vs redshift
pgris Mar 12, 2026
4ba73fb
modif to make this script independent on the user name
pgris Mar 13, 2026
41e130a
add tools to read astro table
pgris Mar 13, 2026
46b3223
tuning
pgris Mar 13, 2026
48a1bcd
add a function to get nsn
pgris Mar 19, 2026
1a65af8
tuning
pgris Mar 19, 2026
260aa82
dL in Mpc in cosmo_values
pgris Mar 25, 2026
8246ee1
update with new cosmo model
pgris Mar 31, 2026
f347191
update
pgris Apr 13, 2026
d12b2f0
add a script to load cosmo params
pgris Apr 15, 2026
6003711
cleaning
pgris Apr 15, 2026
d6fa285
solve pb related to str type parameters, in particular if there are p…
pgris Apr 22, 2026
1fbf825
tuning
pgris Apr 24, 2026
25b9843
script to build a regularGrid interpolator
pgris Apr 27, 2026
2bad0d8
add method parameter for the RegularGridInterpolator
pgris Apr 28, 2026
fe85b6d
some tuning in Hounsel rate
pgris Apr 29, 2026
c991fdb
a new way to estimate the Z dist- bug correction
pgris Apr 29, 2026
49b7f7e
some improvement in nsn vs z random choice
pgris Apr 30, 2026
5c1e623
param tuning
pgris May 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[build-system]
requires = ["setuptools>=61.0.0"]
build-backend = "setuptools.build_meta"

[project]
name = "sn_tools"
version = "1.0.2"
requires-python = ">=3.5"
dependencies = ['astropy_healpix>=0.6','descartes>=1.0','sncosmo>=1.0','aplpy']
authors = [
{name = "Philippe Gris", email = "philippe.gris@clermont.in2p3.fr"}
]
maintainers = [
{name = "Philippe Gris", email = "philippe.gris@clermont.in2p3.fr"}
]
description = "Set of tools to run sn_pipe"
readme = "README.md"
license = {file = "LICENSE"}
classifiers = ["Programming Language :: Python",]

[tool.setuptools.packages.find]
where = [".","sn_script_input"]
include = ['sn_tools', 'sn_analysis','sn_script_input']

[tool.setuptools.package-data]
"*" = ["*.txt"]

[project.urls]
Homepage = "http://github.com/lsstdesc/sn_tools"
Repository = "https://github.com/lsstdesc/sn_tools"
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
###### Requirements without Version Specifiers ######
9 changes: 6 additions & 3 deletions setup.py → setup_deprecated.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup

# get the version here
pkg_vars = {}
pkg_vars = {}

with open("version.py") as fp:
exec(fp.read(), pkg_vars)
Expand All @@ -14,7 +14,10 @@
author='Philippe Gris',
author_email='philippe.gris@clermont.in2p3.fr',
license='BSD',
packages= ['sn_tools'],
packages= ['sn_tools','sn_script_input'],
# All files from folder sn_script_input
package_data={'sn_script_input': ['*.txt']},
python_requires='>=3.5',
zip_safe=False
zip_safe=False,
install_requires=['astropy_healpix>=1.0','descartes>=1.0','sncosmo>=1.0'],
)
1 change: 1 addition & 0 deletions sn_script_input/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .version import __version__
115 changes: 115 additions & 0 deletions sn_script_input/config_cadence.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
## RA and Dec
RA 0.0 float # RA
Dec 0.0 float #Dec

## fieldName (to be set as 'note' in the file)
field DD:COSMOS str # field

## seasons
seasons 1 str # seasons
seasonLength 180 str #season_length (days)
MJDmin 60321. float #MJD min for observations - 1/12/2024

## bands to consider
bands grizy str #bands to consider

## cadence[day] per band
cadence g 1. float # cadence g band
cadence r 1. float # cadence r band
cadence i 1. float # cadence i band
cadence z 1. float # cadence z band
cadence y 1. float # cadence y band

## obs file
obsCondFile m5_night.csv str # Observing condition file
obsFromSimu 0 int # to take obs. cond. from obsCondFile

## fiveSigmaDepth per band
fiveSigmaDepth u 23.48 str #u 5-sigma depth values
fiveSigmaDepth g 24.26 str #g 5-sigma depth values
fiveSigmaDepth r 23.87 str #r 5-sigma depth values
fiveSigmaDepth i 23.46 str #i 5-sigma depth values
fiveSigmaDepth z 22.76 str #z 5-sigma depth values
fiveSigmaDepth y 22.02 str #y 5-sigma depth values

## number of visits per band
Nvisits u 10 int #Nvisits u
Nvisits g 10 int #Nvisits g
Nvisits r 20 int #Nvisits r
Nvisits i 20 int #Nvisits i
Nvisits z 26 int #Nvisits z
Nvisits y 20 int #Nvisits y

## Single visit exposure time
visitExposureTime u 30. float #single visit exp time u-band
visitExposureTime g 30. float #single visit exp time g-band
visitExposureTime r 30. float #single visit exp time r-band
visitExposureTime i 30. float #single visit exp time i-band
visitExposureTime z 30. float #single visit exp time z-band
visitExposureTime y 30. float #single visit exp time y-band

## numExposures
numExposures u 2 int #single visit exp time u-band
numExposures g 2 int #single visit exp time g-band
numExposures r 2 int #single visit exp time r-band
numExposures i 2 int #single visit exp time i-band
numExposures z 2 int #single visit exp time z-band
numExposures y 2 int #single visit exp time y-band

##shift between visits per band per day
shiftDays 0.0069444 float #in days: 10./(24.*60.)

##seeing
seeingFwhmEff u 0.90 float # seeingFwhmEff u-band
seeingFwhmEff g 0.87 float # seeingFwhmEff g-band
seeingFwhmEff r 0.83 float # seeingFwhmEff r-band
seeingFwhmEff i 0.80 float # seeingFwhmEff i-band
seeingFwhmEff z 0.78 float # seeingFwhmEff z-band
seeingFwhmEff y 0.76 float # seeingFwhmEff y-band

seeingFwhmGeom u 0.90 float # seeingFwhmGeom u-band
seeingFwhmGeom g 0.87 float # seeingFwhmGeom g-band
seeingFwhmGeom r 0.83 float # seeingFwhmGeom r-band
seeingFwhmGeom i 0.80 float # seeingFwhmGeom i-band
seeingFwhmGeom z 0.78 float # seeingFwhmGeom z-band
seeingFwhmGeom y 0.76 float # seeingFwhmGeom y-band

##airmass
airmass u 1.2 float #airmass u-band
airmass g 1.2 float #airmass g-band
airmass r 1.2 float #airmass r-band
airmass i 1.2 float #airmass i-band
airmass z 1.2 float #airmass z-band
airmass y 1.2 float #airmass y-band

##sky
sky u 1.2 float #sky g-band
sky g 1.2 float #sky g-band
sky r 1.2 float #sky r-band
sky i 1.2 float #sky i-band
sky z 1.2 float #sky z-band
sky y 1.2 float #sky y-band


## moonPhase
moonPhase u 0.5 float #moonPhase u-band
moonPhase g 0.5 float #moonPhase g-band
moonPhase r 0.5 float #moonPhase r-band
moonPhase i 0.5 float #moonPhase i-band
moonPhase z 0.5 float #moonPhase z-band
moonPhase y 0.5 float #moonPhase y-band
moonPhaseu 20. float #max moon phase for u-obs
moonswapFilter y str #filter to be replaced by when no moon
mooncompensate 0 int # to compensate for moon effects

## rotTelPos
rotTelPos 0 int #tel rotation dithering

## m5file from realistic simus
# m5File NoData str #m5 file from realistic simus
# healpixID -1 int #healpixID for m5 values

## Save data infos
saveData 0 int #flag to save data
outDir ../Fake_Observations str #output directory
outName Fakes str #output file name
35 changes: 35 additions & 0 deletions sn_script_input/config_process.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## generic metric parameters
dbName alt_sched str #db name
dbExtens npy str #db extension
dbDir /sps/lsst/cadence/LSST_SN_CADENCE/cadence_db str #db dir
templateDir /sps/lsst/data/dev/pgris/Templates_final_new str #template dir
nproc 8 int #number of proc
nproc_pixels 8 int #number of proc to process pixels
remove_dithering 0 int #remove dithering for DDF
simuType 0 int #flag for new simulations
saveData 0 int #flag to dump data on disk
dirRefs reference_files str #dir of reference files for the metric
dirFake input/Fake_cadence str #dir of fake files for the metric
pixelmap_dir None str #dir where to find pixel maps
nclusters 0 int #number of clusters in data (DD only)
radius 4.0 float #radius around clusters (DD and Fakes)
pixelList None str #list of healpixIds to process
RAmin 0.0 float #RA min for obs area - for WDF only
RAmax 360. float #RA max for obs area - for WDF only
Decmin -90.0 float #Dec min for obs area - for WDF only
Decmax 40.0 float #Dec max for obs area - for WDF only
npixels -1 int #number of pixels to process
FoV 9.6 float #telescope field of view
# VRO_FP circular str #VRO Focal Plane
# project_FP gnomonic str #type of projection in FP
telrot 0 int #telescope rotation angle
fp_level ccd str #fp level(raft,ccd,sensor)
display 0 int #display results
fieldType DD str #field type DD or WFD
nside 64 int #healpix nside
DD_list COSMOS,CDFS,EDFS,ELAISS1,XMM-LSS str #list of DDFs
fieldName COSMOS str #fieldName - for DD only
ebvofMW_pixel -1.0 float #E(B-V) for pixel processing
lookup_ddf input/simulation/lookup_ddf.csv str #DDF lookup table
noteCol target_name str #obs col to grab field name
code new str#code to use (old/new)
2 changes: 2 additions & 0 deletions sn_script_input/config_sel.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
selection_params input/lc_selection/light_curve_selection.csv str #csv file of LC selection
nproc_sel 8 int # number of procs for multiprocessing
112 changes: 112 additions & 0 deletions sn_script_input/config_test_simtofit_obs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
## config file for observation
config_obs input/sim_to_simu_test/combi_obs.csv str #config file for obs

## fieldName (to be set as 'note' in the file)
field DD:COSMOS str # field

## config file for simu+fit scheme
config_simu input/sim_to_simu_test/combi_simufit.csv str #config file for simu

## RA and Dec
RA 0.0 float # RA
Dec 0.0 float #Dec

## seasons
seasons 1 str # seasons
seasonLength 180 str #season_length (days)
MJDmin 60321. str #MJD min for observations - 1/12/2024

## bands to consider
bands grizy str #bands to consider

## obs file
obsCondFile m5_night.csv str # Observing condition file
obsFromSimu 0 int # to take obs. cond. from obsCondFile

## cadence[day] per band - see config_obs
## cadence g 1. float # cadence g band
## cadence r 1. float # cadence r band
## cadence i 1. float # cadence i band
## cadence z 1. float # cadence z band
## cadence y 1. float # cadence y band

## m5 per band
## m5 per band
m5 u 23.48 str #u 5-sigma depth values
m5 g 24.26 str #g 5-sigma depth values
m5 r 23.87 str #r 5-sigma depth values
m5 i 23.46 str #i 5-sigma depth values
m5 z 22.76 str #z 5-sigma depth values
m5 y 22.02 str #y 5-sigma depth values

## number of visits per band - see config_obs
#Nvisits g 10,2 str #Nvisits g
#Nvisits r 20,9 str #Nvisits r
#Nvisits i 20,37 str #Nvisits i
#Nvisits z 26,52 str #Nvisits z
#Nvisits y 20,21 str #Nvisits y

## Single visit exposure time
ExposureTime u 30. float #single visit exp time g-band
ExposureTime g 30. float #single visit exp time g-band
ExposureTime r 30. float #single visit exp time r-band
ExposureTime i 30. float #single visit exp time i-band
ExposureTime z 30. float #single visit exp time z-band
ExposureTime y 30. float #single visit exp time y-band

##shift between visits per band per day
shiftDays 0.0069444 float #in days: 10./(24.*60.)

##seeing
seeingEff u 0.90 float # seeingEff u-band
seeingEff g 0.87 float # seeingEff g-band
seeingEff r 0.83 float # seeingEff r-band
seeingEff i 0.80 float # seeingEff i-band
seeingEff z 0.78 float # seeingEff z-band
seeingEff y 0.76 float # seeingEff y-band

seeingGeom g 0.90 float # seeingGeom u-band
seeingGeom g 0.87 float # seeingGeom g-band
seeingGeom r 0.83 float # seeingGeom r-band
seeingGeom i 0.80 float # seeingGeom i-band
seeingGeom z 0.78 float # seeingGeom z-band
seeingGeom y 0.76 float # seeingGeom y-band

##airmass
airmass u 1.2 float #airmass u-band
airmass g 1.2 float #airmass g-band
airmass r 1.2 float #airmass r-band
airmass i 1.2 float #airmass i-band
airmass z 1.2 float #airmass z-band
airmass y 1.2 float #airmass y-band

##sky
sky u 1.2 float #sky u-band
sky g 1.2 float #sky g-band
sky r 1.2 float #sky r-band
sky i 1.2 float #sky i-band
sky z 1.2 float #sky z-band
sky y 1.2 float #sky y-band


## moonPhase
moonphase g 0.5 float #moonphase g-band
moonphase r 0.5 float #moonphase r-band
moonphase i 0.5 float #moonphase i-band
moonphase z 0.5 float #moonphase z-band
moonphase y 0.5 float #moonphase y-band
moonPhaseu 20. float #max moon phase for u-obs
moonswapFilter z str #filter to be replaced by when no moon
mooncompensate 0 int # to compensate for moon effects

## rotTelPos
rotTelPos 0 int #tel rotation dithering

## m5file from realistic simus
# m5File NoData str #m5 file from realistic simus
# healpixID -1 int #healpixID for m5 values

## Save data infos
saveData 0 int #flag to save data
outDir ../Fake_Observations str #output directory
outName Fakes str #output file name
24 changes: 24 additions & 0 deletions sn_script_input/config_test_simtofit_simu.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#x1
SN x1 type unique str #SN x1 type
SN x1 min -2.0 float #SN x1 min
SN x1 max 0.2 float #SN x1 max
SN x1 step 0.1 float #SN x1 step
# color
SN color type unique str #SN color type
SN color min 0.2 float #SN color min
SN color max 1.0 float #SN color max
SN color step 0.1 float #SN color step
# redshift
SN z type uniform str #SN z type
SN z min 0.2 float #SN z min
SN z max 1.1 float #SN z max
SN z step 0.01 float #SN z step
# daymax
SN daymax type unique str #SN daymax type
SN daymax step 1. float #SN daymax step
# other parameters
SN NSNfactor 1 int #NSN*factor for simulation
SN NSNabsolute 1 int #absolute number of SN to produce
#Multiprocessing
MultiprocessingSimu nproc 1 int #multiprocessing number of procs
MultiprocessingFit nproc 1 int #multiprocessing number of procs
1 change: 1 addition & 0 deletions sn_script_input/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__='v1.0.0'
17 changes: 17 additions & 0 deletions sn_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
from .version import __version__

"""
import os

# requested infos for throughputs
throughputs_dir = os.path.join(os.getenv("PWD"), "throughputs")
if not os.path.isdir(throughputs_dir):
cmd = 'git clone https://github.com/lsst/throughputs'
os.system(cmd)

os.environ['LSST_THROUGHPUTS_BASELINE'] = '{}/{}'.format(
throughputs_dir, 'baseline')
os.environ['THROUGHPUTS_DIR'] = throughputs_dir

print('Reading throughputs from',
os.environ['LSST_THROUGHPUTS_BASELINE'], os.environ['THROUGHPUTS_DIR'])
"""
Loading