Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# Set update schedule for GitHub Actions

version: 2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/citation-validation.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
on:
pull_request:
branches: [main]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# Derived from https://github.com/cta-observatory/project-template-python-pure/blob/main/.github/workflows/pypi.yml
name: Deploy to PyPi

Expand Down
42 changes: 33 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ repos:
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff
rev: v0.11.4
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.12
hooks:
- id: ruff
args: ["--fix"]
Expand All @@ -20,24 +20,48 @@ repos:
- id: end-of-file-fixer
- id: check-added-large-files
args: ['--maxkb=500']
# https://github.com/HunterMcGushion/docstr_coverage
# - repo: https://github.com/HunterMcGushion/docstr_coverage
# rev: v2.3.2 # most recent docstr-coverage release or commit sha
# hooks:
# - id: docstr-coverage
# args: ["--verbose", "2", "--fail-under", "70.", "v2dl5"]
# Github action
- repo: https://github.com/rhysd/actionlint
rev: v1.7.7
hooks:
- id: actionlint
# https://pyproject-fmt.readthedocs.io/en/latest/
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.5.1"
rev: "v2.6.0"
hooks:
- id: pyproject-fmt
# codespell
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
# markdownlint
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.45.0
hooks:
- id: markdownlint
args: ["--disable", "MD041"]
# yamllint
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.37.1
hooks:
- id: yamllint
args:
- "--strict"
- "-d"
- >
{
extends: default,
rules: {
line-length: {max: 300},
indentation: {spaces: 2, indent-sequences: consistent},
truthy: {allowed-values: ["true", "false", "on", "off"]}
}
}
# towncrier
- repo: https://github.com/twisted/towncrier
rev: 24.8.0
hooks:
- id: towncrier-update
files: $docs/changes/
args: ['--keep']
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# CHANGELOG

All notable changes to the V2DL5-Binary-Analysis project will be documented in this file.
Changes for upcoming releases can be found in the [docs/changes](docs/changes) directory.
Note that changes before release 0.5.0 are not documented here, but can be found in the
[GitHub repository](https://github.com/VERITAS-Observatory/V2DL5-Binary-Analysis/releases).

This changelog is generated using [Towncrier](https://towncrier.readthedocs.io/).

<!-- towncrier release notes start -->
Empty file added docs/changes/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions docs/changes/53.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add towncrier functionality for changelogs.
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# installation:
# create: mamba env create -f environment.yml
# activate: conda activate v2dl5
Expand Down
15 changes: 8 additions & 7 deletions examples/binary_lightcurve_plotting.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
data:
- instrument: VERITAS
file_name: results/light_curve_nightly.ecsv
plot_instrument: true
plot_variable: flux
flux_axis_label: "Flux E>350 GeV (1/(cm$^2$s))"
marker_type: 'o'
marker_color: 'r'
- instrument: VERITAS
file_name: results/light_curve_nightly.ecsv
plot_instrument: true
plot_variable: flux
flux_axis_label: "Flux E>350 GeV (1/(cm$^2$s))"
marker_type: 'o'
marker_color: 'r'
92 changes: 46 additions & 46 deletions examples/reflected_region.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,61 @@
# Configuration for a reflected region analysis

observations:
datastore: ../../../VTS/DL3/v491/dl3_pointlike_moderate2tel/
# search for observations around the target direction
# within a maximum offset of obs_cone_radius
obs_cone_radius: 1.5 deg
required_irf: ['aeff', 'edisp']
datastore: ../../../VTS/DL3/v491/dl3_pointlike_moderate2tel/
# search for observations around the target direction
# within a maximum offset of obs_cone_radius
obs_cone_radius: 1.5 deg
required_irf: ['aeff', 'edisp']

on_region:
target: "Crab"
# frame: icrs
# lon: 83.628700 deg
# lat: 22.014700 deg
target: "Crab"
# frame: icrs
# lon: 83.628700 deg
# lat: 22.014700 deg

datasets:
type: 1d
stack: false
geom:
axes:
energy: {min: 0.1 TeV, max: 100 TeV, nbins: 30}
energy_true: {min: 0.05 TeV, max: 100 TeV, nbins: 40}
exclusion_region:
on_radius: 0.5 deg
magnitude_B: 7
star_exclusion_radius: 0.30 deg
fov: 3.5 deg
star_file: hip_mag9.fits.gz
containment_correction: false
safe_mask:
methods: ['aeff-max']
parameters: {aeff_percent: 10.}
background:
method: reflected
type: 1d
stack: false
geom:
axes:
energy: {min: 0.1 TeV, max: 100 TeV, nbins: 30}
energy_true: {min: 0.05 TeV, max: 100 TeV, nbins: 40}
exclusion_region:
on_radius: 0.5 deg
magnitude_B: 7
star_exclusion_radius: 0.30 deg
fov: 3.5 deg
star_file: hip_mag9.fits.gz
containment_correction: false
safe_mask:
methods: ['aeff-max']
parameters: {aeff_percent: 10.}
background:
method: reflected
fit:
model: pl
index: 2.5
reference_energy: 1 TeV
model: pl
index: 2.5
reference_energy: 1 TeV

flux_points:
energy: {min: 0.1 TeV, max: 20 TeV, nbins: 10}
flux: {min: 1.e-15, max: 1.e-9}
energy: {min: 0.1 TeV, max: 20 TeV, nbins: 10}
flux: {min: 1.e-15, max: 1.e-9}

light_curve:
energy: {min: 1. TeV, max: 100 TeV}
time_zone: -7
n_jobs: 4
# time_bin_files:
# - ./light_curve_3days_timebins.ecsv
energy: {min: 1. TeV, max: 100 TeV}
time_zone: -7
n_jobs: 4
# time_bin_files:
# - ./light_curve_3days_timebins.ecsv

# bad time intervals (time intervals removed from data)
bti:
- run: 64080
bti_start: 600
bti_length: 360
- run: 69976
bti_start: 600
bti_length: 360
- run: 69976
bti_start: 1000
bti_length: 200
- run: 64080
bti_start: 600
bti_length: 360
- run: 69976
bti_start: 600
bti_length: 360
- run: 69976
bti_start: 1000
bti_length: 200