Commit 5d328717 authored by Ambra Di Piano's avatar Ambra Di Piano
Browse files

first commit

parent 472e7d23
Loading
Loading
Loading
Loading
+20 −1
Original line number Diff line number Diff line
# Patterns
.*
*.sh
*.yml
*.png

# Folders
tmp/
analysis_archive/

# Files

# Exceptions
!gitignore
!prod5install.sh
!environment.yml
!rtamock/execute_run.sh
!rtamock/myconfig.yml

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
@@ -14,7 +33,7 @@ dist/
downloads/
eggs/
.eggs/
lib/
#lib/
lib64/
parts/
sdist/

MANIFEST.in

0 → 100644
+3 −0
Original line number Diff line number Diff line
include README.md

recursive-include * *.py
 No newline at end of file

prod5install.sh

0 → 100644
+9 −0
Original line number Diff line number Diff line
#!/bin/bash

mkdir tmp
cd tmp
wget http://cta.irap.omp.eu/ctools/_downloads/csadd2caldb.py
wget https://zenodo.org/record/5499840/files/cta-prod5-zenodo-fitsonly-v0.1.zip
python csadd2caldb.py debug=yes
cd ..
rm -rf tmp

pyproject.toml

0 → 100644
+3 −0
Original line number Diff line number Diff line
[build-system]
requires = ["setuptools>=42"]
build-backend = "setuptools.build_meta"
 No newline at end of file

rtamock/README.md

0 → 100644
+45 −0
Original line number Diff line number Diff line
# Export $VARS and activate environment

- Activate the environment where the SAG-SCI and the science tool in used by the wrapper are installed
- Export the environment variable corresponding to the wrapper, i.e. RTAPH or GAMMAPY

```bash
export RTAPH=path/to/sagsci/wrappers/rtaph
export GAMMAPY=path/to/sagsci/wrappers/gammapy
```

# Prepare dataset

- From single observation create time bins
- From target.xml template create bins file and update source name
- From job.xml template create bins file and update values
- From obs.xml template create bins file and update values

```bash
python prepare_dataset.py -f <myconfig.yml>
```

# Execute analysis single run

- Perform analysis in each bin, either lightcurve (each bin alone) or cumulative (since start of run) and save results
- Move bins and results into the archive 

```bash
python analysis_one_run.py -f <myconfig.yml>
```

# Collect run results from single bins

- From the archive collect all results and create a merged csv data file for easy plotting

```bash
python collect_bins_results.py -f <myconfig.yml>
```

# Plot lightcurves of list of runs

- Load the csv data file and plot the specified curves

```bash
python plot_lightcurves.py -f <myconfig.yml> -cp <true|false>
```
 No newline at end of file
Loading