snana tutorial

Post on 29-Dec-2021

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

SNANATutorial

R.KesslerMay2016

1

2

GOOGLESearch:No,notthisSNANA

3

Thisone

Outline

•  Architecture•  SoBwareInterfaceforPrivateCode•  SystemaKcs&MulK-CoreJobs•  Output•  DocumentaKon

4

Architecture:SummaryofReady-to-RunProgramsin

$SNANA_DIR•  SimulaKonpackage(catalog,notpixels)•  LightCurveFiYng&TemplateFiYng•  HubbleDiagramFiYng(old,simple,fast:be[ercodeselsewhere)

•  UKliKesforsystemaKcs&mulK-coreprocessing•  NOImage-ProcessingTools

5

$SNDATA_ROOT

Architecture:Environment•  SimulaKonpackage(catalog,notpixels)•  LightCurveFiYng&TemplateFiYng•  HubbleDiagramFiYng•  UKliKesforsystemaKcs&mulK-core

processing

6

filters

BD17

MWex/nc/on

Efficien

cym

aps

Ibc IIP

$SNANA_DIR

Host

SNANAArchitecture

SIMULATION LightCurveFiKng

SALT-IIMLCS2k2SNooPyStretchDouble-Stretch

SN Ia models

7

SNANAArchitecture

SIMULATION LightCurveFiKng

SALT-IIMLCS2k2SNooPyStretchDouble-Stretch

SN Ia models

“NON1a”Templates(e.g.,CC)“SIMSED”Sequences(e.g.,Kasenmodels)

8

SNANAArchitecture

SIMULATION LightCurveFiKng

SALT-IIMLCS2k2SNooPyStretchDouble-Stretch

SN Ia models

“NON1a”Templates(e.g.,CC)“SIMSED”Sequences(e.g.,Kasenmodels)

GRID ExternalProgram(e.g.KarpenkaCCtemplates)

9

SNANAArchitecture

SIMULATION LightCurveFiKng

SALT-IIMLCS2k2SNooPyStretchDouble-Stretch

SN Ia models

“NON1a”Templates(e.g.,CC)“SIMSED”Sequences(e.g.,Kasenmodels)

GRID ExternalProgram(e.g.KarpenkaCCtemplates)

PSNIDExternal

10

WhyUseGRID?(versusmodelparams&redshiR)

•  Allowsusingtemplatesconstructedfromnon-SNANAprograms

•  AnySNmodelàstandardmodelformatfortemplate-fiYngprogramssuchasPSNID

•  Canbefaster(e.g.,hugespeed-upforSNooPy)

11

SNANAArchitecture:FileSharing

12

SNANAwasimplicitlydesignedtorunonaclusterwithmanyuserssharingfiles.

Hey,didyouupdatethefiltertransmissionfiles?

SNANAArchitecture:FileSharing

13

SNANAwasimplicitlydesignedtorunonaclusterwithmanyuserssharingfiles.

$SNDATA_ROOT contains•  Data•  Simulatedoutput•  Filtertransmissions•  PrimarySEDs•  Ia&CCspectraltemplates•  MWexKncKonmap•  SNmodelparameters•  SIMLIBfiles•  HOSTLIBfiles•  Efficiencymaps•  Etc...

MostSNANAinputsarein$SNDATA_ROOT.Canruntestswithfile(s)inyourprivatedirectory,butgoalistosharefileswithcommunityvia$SNDATA_ROOT

SNANAArchitecture:SharingProprietaryFiles

14

During analysis it is useful to share proprietary SNANA files,

$SNDATA_ROOT/INTERNAL/SDSS$SNDATA_ROOT/INTERNAL/DES$SNDATA_ROOT/INTERNAL/LSST

INTERNAL directories are not in SNANA downloads.

ENV can be used as part of any input fileName, e.g., set $DES_ROOT = $SNDATA_ROOT/INTERNAL/DES SIMLIB_FILE: $DES_ROOT/simlibs/DES_DIFFIMG.SIMLIB

SNANASimulaKonCapabiliKes•  MulKpleSNIa+IntrinsicSca[ermodels•  CCTemplateswitharbitraryweight,magOff,sca[er•  PeculiarVelociKes(Gausssca[er)•  HostGalaxynoise,photo-z,SNcorrelaKons(HOSTLIB)•  GalacKcExKncKon(SFD98orSchlaffly2012update)•  Arbitraryz-dependenceforanyparam:e.g.,β(z)•  Usemeasuredcadence,skyNoise,ZP,PSF(SIMLIB)•  Wrong-HostmodelwithincorrectzHost•  Flux-ErrorCorrecKon(e.g.,fromfakesonimages)•  SurveyDetecKonEfficvs.S/N(feedstriggerlogic)•  TriggerLogic(e.g.,2nightsabovethreshold)•  SurveyEfficmapforSpec-Confirmed•  SurveyEfficmapforSpec-zHost(e.g.,OzDESeffic)•  SurveyEfficmapforphoto-zHost(e.g.,forSN+hostphoto-zfit)

15

PHYSICS

SURVEY

SNANASimulaKonCapabiliKes•  MulKpleSNIa+IntrinsicSca[ermodels•  CCTemplateswitharbitraryweight,magOff,sca[er•  PeculiarVelociKes(Gausssca[er)•  HostGalaxynoise,photo-z,SNcorrelaKons(HOSTLIB)•  GalacKcExKncKon(SFD98orSchlaffly2012update)•  Arbitraryz-dependenceforanyparam:e.g.,β(z)•  Usemeasuredcadence,skyNoise,ZP,PSF(SIMLIB)•  Wrong-HostmodelwithincorrectzHost•  Flux-ErrorCorrecKon(e.g.,fromfakesonimages)•  SurveyDetecKonEfficvs.S/N(feedstriggerlogic)•  TriggerLogic(e.g.,2nightsabovethreshold)•  SurveyEfficmapforSpec-Confirmed•  SurveyEfficmapforSpec-zHost(e.g.,OzDESeffic)•  SurveyEfficmapforphoto-zHost(e.g.,forSN+hostphoto-zfit)

16

PHYSICS

SURVEYCharacterizingthesurveyiscrucialtoavoidmis-interpre/nginstrumentalar/factsasastrophysics.

SNANACPUProc-TimeIntel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz

•  DESSimulaKon-GenerateSALT-IIlightcurves:70Hzàacceptedrate:8Hz-GenerateCClightcurves:600Hzàacceptedrate:5Hz•  LightCurveFiYng(DES)withSALT-II:4Hz•  NotethatProcessingKmescaleswithnumberofobservaKonsandredshiBrange.

17

SimulaKonSpeed-upTrick

18

Whenefficiencyisverylow(e.g.,forCC),generaKonspeedcanbelimitedbyreadinganewSIMLIBentryforeachevent.Trick:use“SIMLIB_NREPEAT”keytore-useeachSIMLIBentrymanyKmesbeforereadingthenextone.

SoBwareInterfacetoAddPrivateCode

HowtowriteyourownSNANAcode

19

NoInterfaceforSimulaKon

•  However,withoutre-compilingcanadd+newsurvey,filters,SIMLIB,HOSTLIB,calibraKoninfo+newCCtemplates,weights+newSIMSEDmodel(e.g.,Kilonova)(new“soBwaremodel”takes~hourtoinstall)

20

InterfaceforAnalysis

SNANAprogram•  readdataorsim•  Applycuts•  Createtable,LCPLOTfile

21

InterfaceforAnalysis

UserApplicaKon:SNLC_FIT

UserApplicaKon:PSNID

SNANAprogram•  readdataorsim•  Applycuts•  Createtable,LCPLOTfile

22

InterfaceforAnalysis

UserApplicaKon:SNLC_FIT

UserApplicaKon:PSNID

UserApplicaKon:PRIVATE_JOB(C,fortran)-  EnKreanalysis-  modifySNANArouKne-  Writetospecialformat-  Etc...

SNANAprogram•  readdataorsim•  Applycuts•  Createtable,LCPLOTfile

SNANAPrograms

23

InterfaceforAnalysis

UserApplicaKon:SNLC_FIT

UserApplicaKon:PSNID

UserApplicaKon:PRIVATE_JOB(C,fortran)-  EnKreanalysis-  modifySNANArouKne-  Writetospecialformat-  Etc...

SNANAprogram•  readdataorsim•  Applycuts•  Createtable,LCPLOTfile

SNANAPrograms

Writeyourownanalysiscodeinpython(e.g.,Zoheyr’sKNsearch)

24

SystemaKcs&MulK-CoreJobs•  PrecisionanalysestypicallyrequiremanyiteraKonsofsimulaKonsandanalysis,eachwithasmallvariaKoninparametersormethod.

•  SNANAhastoolstoimplementmulK-iteraKonanalysesusingmulK-coreplauorms.

(e.g.,Fermilab,NERSC,Argonne,Midway,Folio...)

25

SNANA

console

SwitchingtoC11Intrinsicsca[ermodel

SystemaKcs&MulK-CoreJobs•  Sim&AnalysiscodesreadinputinstrucKonsfromatextfile.

•  SpecifyvariaKonswithcommand-lineoverridestoavoidmoreinputfiles.

•  SNANAScriptsusecommand-lineoverridefeaturetolaunchmulKplejobsinbatchsystem.

26

sim_SNmix.plLaunchmulKpleSIM(Ia+CC)jobs

split_and_fit.plLaunchmulKplelightcurvefitjobs

SystemaKcs&MulK-CoreJobs

27

sim_SNmix.plLaunchmulKpleSIM(Ia+CC)jobs

Example:SubsetofsimjobsforJLAsystemaKcs.Eachjobàseparatecore

SystemaKcs&MulK-CoreJobs

28

Example:SubsetoffitjobsforPS1systemaKcs

split_and_fit.plLaunchmulKplelightcurvefitjobs

SNANAOutput

29

SIMULATIONOutput

30

DataFiles•  FITSformatforlargejobsor• ASCIIformatfortesKng(1fileperSN)

IsaidNEVERuseasciiformatforlargesimjobs!

SIMULATIONOutput

31

DataFiles•  FITSformatforlargejobsor• ASCIIformatfortesKng(1fileperSN)

IsaidNEVERuseasciiformatforlargesimjobs!

ASCIISummaryFile•  1rowperacceptedSNor•  1rowpergeneratedSN(forefficiency)

SIMULATIONOutput

32

NeverTrustSimulaKonOutputàAlwayscheckdata/MCdistribuKons(redshiB,fitparams,SNR,etc...)

Y’all don’t have to worrynone; I generated themsimulations myself.Who took my beer ?

AnalysisOutputàSNTABLEs

•  SNANAtablebeforefit(1rowperSN)•  FITREStableaBerfit(1rowperSN)•  LCPLOTtablewithlightcurve&best-fitcurve

33

AnalysisOutputàSNTABLEs

•  SNANAtablebeforefit(1rowperSN)•  FITREStableaBerfit(1rowperSN)•  LCPLOTtablewithlightcurve&best-fitcurve

34

Formats:•  TEXT(1filepertable)• HBOOK(alltablesà1file)•  ROOT(alltablesà1file)

•  EasiertoinstallSNANAwithoutHBOOKorROOT(butwillmissmostoutputvariablesfromanalysis)•  NewformatcanbeaddedifinterfacerouKnesareprovided

AnalysisOutputàSNTABLEs

•  SNANAtablebeforefit(1rowperSN)•  FITREStableaBerfit(1rowperSN)

35

-  ALLvariablesstoredinHBOOK&ROOTformat(comparedtoTEXT,moreefficienttoread&write)-  SubsetstoredinTEXTforinputtocosmologyfit-  UKlitytoappendTEXTfile(fromHBOOKorROOT)-  See“sntable_dump”toview,dump,appendtables-  SlowlymovingawayTEXT(exceptfordebug)

SNANADocumentaKon

36

UserInterfaceforManual•  120pagemanualwithnointerfaceexcept‘preview’

•  Difficulttogetstartedwithoutusingexamplesfromsomebodyelse.

•  Wouldappreciatecommunityhelpmakingthisbe[er.

37

TrackingChanges

Ignoreboring“MISC”thatismainlyforme

38

TrackingChanges

YoushouldreadIMPORTANT&USEFULupdates

39

Miscellaneous•  ReportbugsASAP;don’tjusthackaprivatefixforyourself.•  ReportcompilaKonwarnings.•  ThinkabouthowyoucancontributetoSNANA.

•  Inpapers,SNANAcitaKonisnotenough;alsocitesourceofmodels,templatedata,galaxycatalogs,etc.

40

Conclusion

41SNANA Tutorial, May 14 2008 20

From the SNANA Legal Team:

• SIDE EFFECTS include, but are not limited to:

confusion, frustration, watery eyes, head-

aches, weight loss, weight gain,

systematics-limited results, incorrect

results, denial of tenure.

• Do not drive or operate heavy machinery

while using SNANA.

I agree to do whatever the

SNANA instructors request !

top related