Skip to content

Commit

Permalink
Merge pull request #17 from lagoproject/dev-asoreyh
Browse files Browse the repository at this point in the history
New lagoSites.jsonld parser
  • Loading branch information
asoreyh authored May 13, 2022
2 parents dad3e15 + faa9a8f commit e25ae6f
Show file tree
Hide file tree
Showing 9 changed files with 2,976 additions and 1,079 deletions.
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012, The LAGO Project
Copyright (c) 2015, The LAGO Collaboration, https://lagoproject.net
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand All @@ -9,4 +9,4 @@ Redistribution and use in source and binary forms, with or without modification,

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
70 changes: 46 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,50 @@
# Makefile --
# Copyright (C) 2012-TODAY The LAGO Project, http://lagoproject.org, lago-pi@lagoproject.org
# Original authors: Hernán Asorey
# e-mail: asoreyh@cab.cnea.gov.ar (asoreyh@gmail.com)
# Laboratorio de Detección de Partículas y Radiación (LabDPR)
# Centro Atómico Bariloche - San Carlos de Bariloche, Argentina
#
# /************************************************************************/
# /* Package: ARTI */
# /* Module: Makefile */
# /************************************************************************/
# /* Authors: Hernán Asorey */
# /* e-mail: hernan.asoreyh@iteda.cnea.gov.ar */
# /************************************************************************/
# /* Comments: Compile the LAGO ARTI analysis tools */
# /************************************************************************/
# /*
# LICENSE BSD-3-Clause
# Copyright (c) 2012, The LAGO Project
# Copyright (c) 2015
# The LAGO Collaboration
# https://lagoproject.net
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

# -*- coding: utf8 -*-
# try to preserve encoding

#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
# NO EVENT SHALL LAB DPR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# The views and conclusions contained in the software and documentation are
# those of the authors and should not be interpreted as representing
# official policies, either expressed or implied, of Lab DPR.
#
# */
# /************************************************************************/
#
VERSION="v1r9";
CODE_DIR = analysis
TESTS = check-lago

Expand All @@ -40,4 +62,4 @@ ifndef LAGO_ARTI
$(info I will define it to $PWD, and modify the .bashrc)
$(shell $(PWD)/lago-arti.sh)
$(info Done. Now open a new terminal or execute source $(HOME)/.bashrc)
endif
endif
40 changes: 16 additions & 24 deletions lago-arti.sh
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
#!/bin/bash
# lago-arti.sh
# define LAGO_ARTI and modify .bashrc
# Copyright (C) 2012-TODAY The LAGO Project, http://lagoproject.org, lago-pi@lagoproject.org
# Original authors: Hernán Asorey
# e-mail: asoreyh@cab.cnea.gov.ar (asoreyh@gmail.com)
# Laboratorio de Detección de Partículas y Radiación (LabDPR)
# Centro Atómico Bariloche - San Carlos de Bariloche, Argentina
#
# /************************************************************************/
# /* Package: ARTI */
# /* Module: lago_arti.sh */
# /************************************************************************/
# /* Authors: Hernán Asorey */
# /* e-mail: hernan.asoreyh@iteda.cnea.gov.ar */
# /************************************************************************/
# /* Comments: Configure environment variables for a fresh ARTI install */
# /************************************************************************/
# /*
# LICENSE BSD-3-Clause
# Copyright (c) 2012, The LAGO Project
# Copyright (c) 2015
# The LAGO Collaboration
# https://lagoproject.net
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

# -*- coding: utf8 -*-
# try to preserve encoding
VERSION="v1r9"
export LAGO_ARTI=${PWD}
date=$(date -u)
echo "
#
## Changes added by the LAGO ARTI suite on $date
## Changes added by the LAGO ARTI suite $VERSION on $date
#
export LAGO_ARTI=\"${LAGO_ARTI}\"
export PATH=\"\${LAGO_ARTI}/sims/:\${LAGO_ARTI}/analysis:\$PATH\"
" >> ${HOME}/.bashrc
" >> ${HOME}/.bashrc
43 changes: 19 additions & 24 deletions sims/do_sims.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
#!/bin/bash
# /************************************************************************/
# /* */
# /* Package: ARTI */
# /* Module: do_sims.sh */
# /* */
# /* Module: do_sims.sh */
# /************************************************************************/
# /* Authors: Hernán Asorey */
# /* e-mail: asoreyh@cab.cnea.gov.ar */
# /* */
# /* e-mail: hernan.asoreyh@iteda.cnea.gov.ar */
# /************************************************************************/
# /* Comments: Main script to automatize secondary flux calculations and */
# /* run simulations in a single personal computer */
# /* */
# /* Comments: Main script to automatize secondary flux calculations */
# /************************************************************************/
# /*
#
# Copyright 2017
# Hernán Asorey
# Lab DPR (CAB-CNEA), Argentina
# Grupo Halley (UIS), Colombia
# /*
# LICENSE BSD-3-Clause
# Copyright (c) 2015
# The LAGO Collaboration
# https://lagoproject.net
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -51,20 +45,20 @@
# */
# /************************************************************************/
#
VERSION="v1r0"; # Tue Aug 6 15:43:52 COT 2013

VERSION="v1r9";
showhelp() {
echo
echo -e "$0 version $VERSION"
echo
echo -e "USAGE $0:"
echo -e
echo -e "Simulation parameters"
echo -e " -w <working dir> : Working directory, where bin (run) files are located"
echo -e " -p <project name> : Project name (suggested format: NAMEXX)"
echo -e " -v <CORSIKA version> : CORSIKA version"
echo -e " -h <HE Int Model (EPOS|QGSII)> : Define the high interaction model to be used"
echo -e " -u <user name> : User Name."
echo -e " -j <procs> : Number of processors to use"
echo -e
echo -e "Physical parameters"
echo -e " -t <flux time> : Flux time (in seconds) for simulations"
echo -e " -m <Low edge zenith angle> : Low edge of zenith angle."
Expand All @@ -73,13 +67,16 @@ showhelp() {
echo -e " -i <Upper primary particle energy> : Upper limit of the primary particle energy."
echo -e " -a <high energy ecuts> : High energy cuts for ECUTS; (if set value in GV = enabled)."
echo -e " -y : Select volumetric detector mode (default=flat array)"
echo -e
echo -e "Site parameters"
echo -e " -s <site> : Location (several options)"
echo -e " -k <altitude, in cm> : Fix altitude, even for predefined sites"
echo -e " -c <atm_model> : Fix Atmospheric Model even for predefined sites."
echo -e " -o <BX> : Horizontal comp. of the Earth's mag. field."
echo -e " -q <BZ> : Vertical comp. of the Earth's mag. field."
echo -e " -b <rigidity cutoff> : Rigidity cutoff; (if set value in GV = enabled)."
echo -e " -b <rigidity cutoff> : Rigidity cutoff; (if set value in GV = enabled, <0 = disable)."
echo -e " -g <Lat, Lon> *dev : Obtain the current values of BX and BZ for a site located at (Lat,Lon,Alt), -k option is mandatory. If -s is used, then (Lat,Lon,Alt) will be taken from the standard characterization of the site."
echo -e
echo -e "Modifiers"
echo -e " -l : Enables SLURM cluster compatibility (with sbatch)."
echo -e " -e : Enable CHERENKOV mode"
Expand Down Expand Up @@ -316,7 +313,7 @@ fi
if $highsec; then
echo -e "# WARNING: High energy cuts of $ecut GeV for secondaries will be used."
if [ $lowppe -lt $ecut ]; then
lowppe="$ecut"
lowppe=$ecut
lppe=true
echo -e "# WARNING: Primary particle low energy limit is below energy cuts for secondaries. Changing to: $lowppe"
fi
Expand All @@ -326,7 +323,6 @@ if $slurm; then
echo -e "# WARNING: SLURM mode is enable. Will not work in other environments."
fi


corsika_bin="corsika${ver}Linux_${hig}_gheisha"
if [ ! -e $wdir/$corsika_bin ]; then
echo; echo -e "ERROR: Can't locate corsika executable file ($corsika_bin) in the working dir you provided. Please check."
Expand Down Expand Up @@ -426,9 +422,8 @@ if $slurm; then
fi

rain="$rain -r $wdir -v $ver -h $hig -b $prj/\$i-*.run"

echo -e "# INFO : rain command: $rain"

# echo -e "# INFO : rain command: $rain"
echo -e "# INFO : Calculations done. Now run the go_${prj}_* scripts in $wdir/"
basenice=19
if $slurm; then
basenice=0;
Expand Down Expand Up @@ -529,4 +524,4 @@ if $slurm; then
echo -e "squeue -u \$USER" >> $wdir/go-slurm-$prj.sh
echo -e "mv $wdir/go-slurm-$prj.sh $wdir/go-slurm-$prj.run" >> $wdir/go-slurm-$prj.sh
echo -e "chmod 644 $wdir/go-slurm-$prj.run" >> $wdir/go-slurm-$prj.sh
fi
fi
Loading

0 comments on commit e25ae6f

Please sign in to comment.