Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: command line interface #72

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all 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 .commitlint.rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = {
"always",
[
"catalog",
"cli",
"core",
"covariance",
"io",
Expand Down
72 changes: 72 additions & 0 deletions examples/heracles.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# example config file for Heracles
# values from [defaults] are applied to all sections

[defaults]
lmin = 10
bins = 32 log 2l+1

[spectra:clustering]
include = D, D
lmax = 2000
l2max = 4000

[spectra:shear]
include =
G_E, G_E
G_B, G_B
G_E, G_B
lmax = 3000
l2max = 5000

[spectra:ggl]
include =
D, G_E
D, G_B
lmax = 1000
l2max = 2000

[fields:D]
type = positions
columns =
SHE_RA
SHE_DEC
mask = V
nside = 2048
lmax = 2000

[fields:G]
type = shears
columns =
SHE_RA
SHE_DEC
SHE_E1_CAL
-SHE_E2_CAL
SHE_WEIGHT
mask = W
nside = 2048
lmax = 3000

[fields:V]
type = visibility
nside = 4096
lmax = 6000

[fields:W]
type = weights
columns =
SHE_RA
SHE_DEC
SHE_WEIGHT
nside = 8192
lmax = 8000

[catalogs:fs2-dr1n-noia]
source = catalog.fits
selections =
0 = TOM_BIN_ID==0
1 = TOM_BIN_ID==1
2 = TOM_BIN_ID==2
visibility =
0 = vmap.0.fits
1 = vmap.1.fits
2 = vmap.2.fits
25 changes: 25 additions & 0 deletions heracles/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Heracles: Euclid code for harmonic-space statistics on the sphere
#
# Copyright (C) 2023 Euclid Science Ground Segment
#
# This file is part of Heracles.
#
# Heracles is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Heracles is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with Heracles. If not, see <https://www.gnu.org/licenses/>.
"""Executable module."""

import sys

from .cli import main

sys.exit(main())
Loading
Loading