diff --git a/agilepy/api/AGAnalysis.py b/agilepy/api/AGAnalysis.py index 49d556f0..10629ae8 100644 --- a/agilepy/api/AGAnalysis.py +++ b/agilepy/api/AGAnalysis.py @@ -159,7 +159,6 @@ def getConfiguration(confFilePath, userName, sourceName, tmin, tmax, timetype, g output: outdir: {outputDir} filenameprefix: analysis_product - logfilenameprefix: analysis_log sourcename: {sourceName} username: {userName} verboselvl: {verboselvl} @@ -955,7 +954,6 @@ def lightCurveMLE(self, sourceName, tmin = None, tmax = None, timetype = None, b (_, last) = Utils._getFirstAndLastLineInFile(configBKP.getConf("input", "evtfile")) idxTmax = float(Utils._extractTimes(last)[1]) - # logFilenamePrefix = configBKP.getConf("output","logfilenameprefix") # verboseLvl = configBKP.getConf("output","verboselvl") self.logger.info( f"[LC] Number of processes: {processes}, Number of bins per process {len(binsForProcesses[0])}") @@ -994,9 +992,8 @@ def lightCurveMLE(self, sourceName, tmin = None, tmax = None, timetype = None, b """ processes = [] for pID, pInputs in enumerate(binsForProcesses): - logFilenamePrefix += f"_thread_{pID}" self.logger.info("generating process...(%d). Chunk size for process: %d"%(pID, len(pInputs))) - p = Process(target=self._computeLcBin, args=(pID, pInputs, configBKP, lcAnalysisDataDir, logsOutDir, logFilenamePrefix, verboseLvl)) + p = Process(target=self._computeLcBin, args=(pID, pInputs, configBKP, lcAnalysisDataDir, logsOutDir, verboseLvl)) processes.append((pID,p,len(pInputs))) for pID, p, binsNumber in processes: @@ -1381,11 +1378,11 @@ def _updateFovMinMaxValues(fovbinnumber, fovradmin, fovradmax, stepi): """ The light curve data generation could be parallalezed.. - def _computeLcBin(self, threadID, bins, configBKP, lcAnalysisDataDir, logsOutDir, logFilenamePrefix, verboseLvl): + def _computeLcBin(self, threadID, bins, configBKP, lcAnalysisDataDir, logsOutDir, verboseLvl): logger = AgilepyLogger() - logger.initialize(logsOutDir, logFilenamePrefix, verboseLvl) + logger.initialize(logsOutDir, verboseLvl) # outputs = [] diff --git a/agilepy/api/AGAnalysisWavelet.py b/agilepy/api/AGAnalysisWavelet.py index 99ab49ed..7d20e458 100644 --- a/agilepy/api/AGAnalysisWavelet.py +++ b/agilepy/api/AGAnalysisWavelet.py @@ -97,7 +97,6 @@ def getConfiguration(confFilePath, userName, outputDir, verboselvl, ctsmap, scal output: outdir: %s filenameprefix: wavelet_product - logfilenameprefix: eng_log username: %s sourcename: wavelet verboselvl: %d diff --git a/agilepy/api/AGBayesianBlocks.py b/agilepy/api/AGBayesianBlocks.py index 2eb0195d..05484b79 100644 --- a/agilepy/api/AGBayesianBlocks.py +++ b/agilepy/api/AGBayesianBlocks.py @@ -97,7 +97,6 @@ def getConfiguration(confFilePath, outputDir, filePath, output: outdir: {outputDir} filenameprefix: analysis_product - logfilenameprefix: analysis_log sourcename: {sourceName} username: {userName} verboselvl: {verboselvl} diff --git a/agilepy/api/AGEngAgileFermiOffAxisVisibilityComparison.py b/agilepy/api/AGEngAgileFermiOffAxisVisibilityComparison.py index 2e061d2f..03b3c848 100644 --- a/agilepy/api/AGEngAgileFermiOffAxisVisibilityComparison.py +++ b/agilepy/api/AGEngAgileFermiOffAxisVisibilityComparison.py @@ -139,7 +139,6 @@ def getConfiguration(confFilePath, userName, outputDir, verboselvl): output: outdir: %s filenameprefix: eng_product - logfilenameprefix: eng_log username: %s sourcename: agilefermioffaxis verboselvl: %d diff --git a/agilepy/api/AGEngAgileOffaxisVisibility.py b/agilepy/api/AGEngAgileOffaxisVisibility.py index 8aee4fed..61eeeaf6 100644 --- a/agilepy/api/AGEngAgileOffaxisVisibility.py +++ b/agilepy/api/AGEngAgileOffaxisVisibility.py @@ -88,7 +88,6 @@ def getConfiguration(confFilePath, userName, outputDir, verboselvl): output: outdir: %s filenameprefix: eng_product - logfilenameprefix: eng_log username: %s sourcename: offaxis verboselvl: %d diff --git a/agilepy/api/AGRatemeters.py b/agilepy/api/AGRatemeters.py index d36db868..9ebc2ab4 100644 --- a/agilepy/api/AGRatemeters.py +++ b/agilepy/api/AGRatemeters.py @@ -80,7 +80,6 @@ def getConfiguration(confFilePath, outputDir, filePath, timetype, T0, output: outdir: {outputDir} filenameprefix: ratemeters_product - logfilenameprefix: ratemeters_log sourcename: {sourceName} username: {userName} verboselvl: {verboselvl} diff --git a/agilepy/config/AGAnalysisConfig.py b/agilepy/config/AGAnalysisConfig.py index 600253b3..56c64d56 100644 --- a/agilepy/config/AGAnalysisConfig.py +++ b/agilepy/config/AGAnalysisConfig.py @@ -135,7 +135,7 @@ def checkOptionsType(self, **kwargs): # String - elif optionName in ["evtfile", "logfile", "outdir", "filenameprefix", "logfilenameprefix", \ + elif optionName in ["evtfile", "logfile", "outdir", "filenameprefix", \ "timetype", "timelist", "projtype", "proj", "modelfile", "minimizertype", \ "minimizeralg", "maplistgen", "irf"]: diff --git a/agilepy/config/AGBayesianBlocksConfig.py b/agilepy/config/AGBayesianBlocksConfig.py index 59fd4c47..08c36ed9 100644 --- a/agilepy/config/AGBayesianBlocksConfig.py +++ b/agilepy/config/AGBayesianBlocksConfig.py @@ -94,7 +94,7 @@ def checkOptionsType(self, **kwargs): elif optionName in ["ratecorrection", "tstart", "tstop", "p0", "gamma"]: validType = (Number, 0) # String - elif optionName in ["logfile", "filenameprefix", "logfilenameprefix", "sourcename", "username", + elif optionName in ["logfile", "filenameprefix", "sourcename", "username", "file_path", "file_mode", "fitness", ]: validType = (str, 0) diff --git a/agilepy/config/AGEngAgileFermiOffAxisVisibilityComparisonConfig.py b/agilepy/config/AGEngAgileFermiOffAxisVisibilityComparisonConfig.py index 127defcb..b6ed0d65 100644 --- a/agilepy/config/AGEngAgileFermiOffAxisVisibilityComparisonConfig.py +++ b/agilepy/config/AGEngAgileFermiOffAxisVisibilityComparisonConfig.py @@ -24,7 +24,7 @@ def checkOptionsType(self, **kwargs): validType = () # String - if optionName in ["logfile", "outdir", "filenameprefix", "logfilenameprefix"]: + if optionName in ["logfile", "outdir", "filenameprefix"]: validType = (str, 0) diff --git a/agilepy/config/AGEngAgileOffaxisVisibilityConfig.py b/agilepy/config/AGEngAgileOffaxisVisibilityConfig.py index 5f787a92..fe0f488f 100644 --- a/agilepy/config/AGEngAgileOffaxisVisibilityConfig.py +++ b/agilepy/config/AGEngAgileOffaxisVisibilityConfig.py @@ -24,7 +24,7 @@ def checkOptionsType(self, **kwargs): validType = () # String - if optionName in ["logfile", "outdir", "filenameprefix", "logfilenameprefix"]: + if optionName in ["logfile", "outdir", "filenameprefix"]: validType = (str, 0) diff --git a/agilepy/config/AGRatemetersConfig.py b/agilepy/config/AGRatemetersConfig.py index 62d558cc..3c4a0cf0 100644 --- a/agilepy/config/AGRatemetersConfig.py +++ b/agilepy/config/AGRatemetersConfig.py @@ -150,7 +150,7 @@ def checkOptionsType(self, **kwargs): elif optionName in ["background_tmin", "background_tmax", "signal_tmin", "signal_tmax", "T0"]: validType = (Number, 0) # String - elif optionName in ["logfile", "filenameprefix", "logfilenameprefix", "sourcename", "username", "file_path", "timetype"]: + elif optionName in ["logfile", "filenameprefix", "sourcename", "username", "file_path", "timetype"]: validType = (str, 0) # Path elif optionName in ["outdir"]: diff --git a/agilepy/config/AgilepyConfig.py b/agilepy/config/AgilepyConfig.py index 7e31cfd0..043b3eaf 100644 --- a/agilepy/config/AgilepyConfig.py +++ b/agilepy/config/AgilepyConfig.py @@ -83,9 +83,6 @@ def loadBaseConfigurations(self, configurationFilePath): if user_conf["output"]["filenameprefix"] is None: errors.append("Please, set output/filenameprefix") - if user_conf["output"]["logfilenameprefix"] is None: - errors.append("Please, set output/logfilenameprefix") - if user_conf["output"]["sourcename"] is None: errors.append("Please, set output/sourcename") @@ -250,7 +247,7 @@ def getConf(self, key=None, subkey=None): @staticmethod def _notUpdatable(optionName): - if optionName in ["userestapi", "datapath", "logfilenameprefix", "verboselvl"]: + if optionName in ["userestapi", "datapath", "verboselvl"]: return True return False diff --git a/agilepy/scripts/download_test_dataset.sh b/agilepy/scripts/download_test_dataset.sh index cb0d8f4d..d5d22ffb 100755 --- a/agilepy/scripts/download_test_dataset.sh +++ b/agilepy/scripts/download_test_dataset.sh @@ -1,21 +1,11 @@ #!/bin/bash -set -e +set -euo pipefail # Set the directory path (change this to your target directory) DIR="$AGILE/agilepy-test-data/" -# # Check if the directory exists -# if [ -d "$DIR" ]; then -# echo "Directory $DIR exists. Removing it..." -# rm -rf "$DIR" -# echo "Directory removed." -# else -# echo "Directory $DIR does not exist." -# fi -# -# # Create the directory -# mkdir -p "$DIR" -# echo "Directory $DIR created." +# Ensure directory exists +mkdir -p "$DIR" # Move into the directory cd "$DIR" || { echo "Failed to enter directory $DIR"; exit 1; } @@ -24,22 +14,30 @@ echo "Now inside $DIR" # Download test dataset echo "Download test dataset..." -# These are downloaded in the base image -# wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1B31SCrHoOU0KnZoaZ7NTq6nY_PTD-ner' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1B31SCrHoOU0KnZoaZ7NTq6nY_PTD-ner" -O test_dataset_6.0.tar.gz && rm -rf /tmp/cookies.txt && \ -# tar -xzf test_dataset_6.0.tar.gz && \ -# rm test_dataset_6.0.tar.gz - -# wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1B3Tp-01-X7Cwh6lq11BUCiaHuctj0iDW' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1B3Tp-01-X7Cwh6lq11BUCiaHuctj0iDW" -O test_dataset_agn.tar.gz && rm -rf /tmp/cookies.txt && \ -# tar -xzf test_dataset_agn.tar.gz && \ -# rm test_dataset_agn.tar.gz - -wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1dRfBltxWvijKjxgU9lHTJRm--l8tbgGZ' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1dRfBltxWvijKjxgU9lHTJRm--l8tbgGZ" -O bayesian_blocks.tar.gz && rm -rf /tmp/cookies.txt && \ -tar -xzf bayesian_blocks.tar.gz && \ -rm bayesian_blocks.tar.gz - -wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1m7DhHHxiU3Q81biNvTGRAhFjP0j5IJfL' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1m7DhHHxiU3Q81biNvTGRAhFjP0j5IJfL" -O ratemeters.tar.gz && rm -rf /tmp/cookies.txt && \ -tar -xzf ratemeters.tar.gz && \ -rm ratemeters.tar.gz +# Function to download and extract only if missing +download_and_extract() { + local id="$1" + local tar_name="$2" + local extract_dir="$3" + + if [ -d "$extract_dir" ]; then + echo " $extract_dir already exists, skipping download." + else + echo " Downloading $tar_name ..." + wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate "https://docs.google.com/uc?export=download&id=$id" -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1/p')&id=$id" -O "$tar_name" && \ + rm -f /tmp/cookies.txt && \ + tar -xzf "$tar_name" && \ + rm "$tar_name" + + echo " Extracted $extract_dir" + fi +} + +# Datasets +download_and_extract "1B31SCrHoOU0KnZoaZ7NTq6nY_PTD-ner" "test_dataset_6.0.tar.gz" "test_dataset_6.0" +download_and_extract "1B3Tp-01-X7Cwh6lq11BUCiaHuctj0iDW" "test_dataset_agn.tar.gz" "test_dataset_agn" +download_and_extract "1dRfBltxWvijKjxgU9lHTJRm--l8tbgGZ" "bayesian_blocks.tar.gz" "bayesian_blocks" +download_and_extract "1m7DhHHxiU3Q81biNvTGRAhFjP0j5IJfL" "ratemeters.tar.gz" "ratemeters" # End echo "Download completed!" diff --git a/agilepy/testing/unittesting/api/conf/agilepyconf.yaml b/agilepy/testing/unittesting/api/conf/agilepyconf.yaml index f3ea4a80..1a3cdd1f 100644 --- a/agilepy/testing/unittesting/api/conf/agilepyconf.yaml +++ b/agilepy/testing/unittesting/api/conf/agilepyconf.yaml @@ -7,7 +7,6 @@ input: output: outdir: $TEST_LOGS_DIR filenameprefix: testcase - logfilenameprefix: logtestcase sourcename: vela username: unittesting verboselvl: 0 diff --git a/agilepy/testing/unittesting/api/conf/agilepyconfREST.yaml b/agilepy/testing/unittesting/api/conf/agilepyconfREST.yaml index a6d3d304..59bd0232 100644 --- a/agilepy/testing/unittesting/api/conf/agilepyconfREST.yaml +++ b/agilepy/testing/unittesting/api/conf/agilepyconfREST.yaml @@ -7,7 +7,6 @@ input: output: outdir: $TEST_LOGS_DIR filenameprefix: testcase - logfilenameprefix: logtestcase sourcename: vela username: unittesting verboselvl: 0 diff --git a/agilepy/testing/unittesting/api/conf/agilepyconf_ageng.yaml b/agilepy/testing/unittesting/api/conf/agilepyconf_ageng.yaml index 37715adb..e18c0fdb 100644 --- a/agilepy/testing/unittesting/api/conf/agilepyconf_ageng.yaml +++ b/agilepy/testing/unittesting/api/conf/agilepyconf_ageng.yaml @@ -1,7 +1,6 @@ output: outdir: $TEST_LOGS_DIR filenameprefix: testcase - logfilenameprefix: logtestcase sourcename: eng username: user-test verboselvl: 0 \ No newline at end of file diff --git a/agilepy/testing/unittesting/api/conf/agilepyconf_ratemeters.yaml b/agilepy/testing/unittesting/api/conf/agilepyconf_ratemeters.yaml index eaa90f8b..f3eb06b3 100644 --- a/agilepy/testing/unittesting/api/conf/agilepyconf_ratemeters.yaml +++ b/agilepy/testing/unittesting/api/conf/agilepyconf_ratemeters.yaml @@ -1,7 +1,6 @@ output: outdir: $TEST_LOGS_DIR filenameprefix: test_rm - logfilenameprefix: test_rm sourcename: src-rm-test username: user-test verboselvl: 2 diff --git a/agilepy/testing/unittesting/api/conf/agilepyconfbkg.yaml b/agilepy/testing/unittesting/api/conf/agilepyconfbkg.yaml index cde034c7..326a5e28 100644 --- a/agilepy/testing/unittesting/api/conf/agilepyconfbkg.yaml +++ b/agilepy/testing/unittesting/api/conf/agilepyconfbkg.yaml @@ -7,7 +7,6 @@ input: output: outdir: $TEST_LOGS_DIR filenameprefix: testcase - logfilenameprefix: logtestcase sourcename: vela username: unittesting verboselvl: 2 diff --git a/agilepy/testing/unittesting/api/conf/conf_bb_agile_ph.yaml b/agilepy/testing/unittesting/api/conf/conf_bb_agile_ph.yaml index 30b4a061..52c1f6c5 100644 --- a/agilepy/testing/unittesting/api/conf/conf_bb_agile_ph.yaml +++ b/agilepy/testing/unittesting/api/conf/conf_bb_agile_ph.yaml @@ -1,7 +1,6 @@ output: outdir: $TEST_LOGS_DIR filenameprefix: testcase - logfilenameprefix: testcase sourcename: source-test username: user-test verboselvl: 2 diff --git a/agilepy/testing/unittesting/api/conf/conf_rm_GRB231129C.yaml b/agilepy/testing/unittesting/api/conf/conf_rm_GRB231129C.yaml index 285494a9..4c1fa139 100644 --- a/agilepy/testing/unittesting/api/conf/conf_rm_GRB231129C.yaml +++ b/agilepy/testing/unittesting/api/conf/conf_rm_GRB231129C.yaml @@ -1,7 +1,6 @@ output: outdir: $TEST_LOGS_DIR filenameprefix: test_rm - logfilenameprefix: test_rm sourcename: src-rm-test username: user-test verboselvl: 2 diff --git a/agilepy/testing/unittesting/api/test_ag_analysis.py b/agilepy/testing/unittesting/api/test_ag_analysis.py index 4b339908..d8c1d7a9 100644 --- a/agilepy/testing/unittesting/api/test_ag_analysis.py +++ b/agilepy/testing/unittesting/api/test_ag_analysis.py @@ -559,7 +559,6 @@ def test_fix_exponent(self, environ_test_logs_dir, config, testdatafiles): ag.destroy() - #@pytest.mark.skip("Fails on MACOS") @pytest.mark.testlogsdir("api/test_logs/test_aperture_photometry") @pytest.mark.testconfig("api/conf/agilepyconf.yaml") @pytest.mark.testdatafiles(["api/conf/sourcesconf_1.txt"]) diff --git a/agilepy/testing/unittesting/api/test_ag_bayesianblocks.py b/agilepy/testing/unittesting/api/test_ag_bayesianblocks.py index bdce5d39..3afa86e2 100644 --- a/agilepy/testing/unittesting/api/test_ag_bayesianblocks.py +++ b/agilepy/testing/unittesting/api/test_ag_bayesianblocks.py @@ -347,7 +347,6 @@ def test_get_configuration(self, environ_test_logs_dir, testdata): assert ag_bb.getOption("username") == "my_name" assert ag_bb.getOption("sourcename") == "bb-source" assert ag_bb.getOption("filenameprefix") == "analysis_product" - assert ag_bb.getOption("logfilenameprefix") =="analysis_log" assert ag_bb.getOption("verboselvl") == 0 assert ag_bb.getOption('file_path') == testdata diff --git a/agilepy/testing/unittesting/api/test_ag_eng_agile_offaxis_visibility.py b/agilepy/testing/unittesting/api/test_ag_eng_agile_offaxis_visibility.py index 750f54be..26416016 100644 --- a/agilepy/testing/unittesting/api/test_ag_eng_agile_offaxis_visibility.py +++ b/agilepy/testing/unittesting/api/test_ag_eng_agile_offaxis_visibility.py @@ -25,8 +25,6 @@ #You should have received a copy of the GNU General Public License #along with this program. If not, see . -import os -import unittest import pytest from pathlib import Path from agilepy.utils.Utils import Utils diff --git a/agilepy/testing/unittesting/api/test_ag_ratemeters.py b/agilepy/testing/unittesting/api/test_ag_ratemeters.py index daad707f..5d977ff0 100644 --- a/agilepy/testing/unittesting/api/test_ag_ratemeters.py +++ b/agilepy/testing/unittesting/api/test_ag_ratemeters.py @@ -139,7 +139,6 @@ def test_get_configuration(self, environ_test_logs_dir, testdata): assert ag_rm.getOption("username") == "my_name" assert ag_rm.getOption("sourcename") == "rm-source" assert ag_rm.getOption("filenameprefix") == "ratemeters_product" - assert ag_rm.getOption("logfilenameprefix") =="ratemeters_log" assert ag_rm.getOption("verboselvl") == 0 assert ag_rm.getOption('file_path') == testdata diff --git a/agilepy/testing/unittesting/config/conf/agilepyconf.yaml b/agilepy/testing/unittesting/config/conf/agilepyconf.yaml index 05fa6426..c83e1800 100644 --- a/agilepy/testing/unittesting/config/conf/agilepyconf.yaml +++ b/agilepy/testing/unittesting/config/conf/agilepyconf.yaml @@ -7,7 +7,6 @@ input: output: outdir: $AGILE/agilepy-test-data/unittesting-output/config filenameprefix: testcase - logfilenameprefix: testcase sourcename: source-test username: user-test verboselvl: 1 diff --git a/agilepy/testing/unittesting/config/conf/conf1.yaml b/agilepy/testing/unittesting/config/conf/conf1.yaml index eeddd51f..ad715f27 100644 --- a/agilepy/testing/unittesting/config/conf/conf1.yaml +++ b/agilepy/testing/unittesting/config/conf/conf1.yaml @@ -7,7 +7,6 @@ input: output: outdir: $AGILE/agilepy-test-data/unittesting-output/config filenameprefix: testcase - logfilenameprefix: testcase sourcename: source-test username: user-test verboselvl: 1 diff --git a/agilepy/testing/unittesting/config/conf/conf2.yaml b/agilepy/testing/unittesting/config/conf/conf2.yaml index 835f530a..138a287a 100644 --- a/agilepy/testing/unittesting/config/conf/conf2.yaml +++ b/agilepy/testing/unittesting/config/conf/conf2.yaml @@ -7,7 +7,6 @@ input: output: outdir: $AGILE/agilepy-test-data/unittesting-output/config filenameprefix: testcase - logfilenameprefix: testcase sourcename: source-test username: user-test verboselvl: 1 diff --git a/agilepy/testing/unittesting/config/conf/conf3.yaml b/agilepy/testing/unittesting/config/conf/conf3.yaml index 111b731e..af605c06 100644 --- a/agilepy/testing/unittesting/config/conf/conf3.yaml +++ b/agilepy/testing/unittesting/config/conf/conf3.yaml @@ -7,7 +7,6 @@ input: output: outdir: $AGILE/agilepy-test-data/unittesting-output/config filenameprefix: testcase - logfilenameprefix: testcase sourcename: source-test username: user-test verboselvl: 1 diff --git a/agilepy/testing/unittesting/config/conf/conf4.yaml b/agilepy/testing/unittesting/config/conf/conf4.yaml index cb69ce8d..e5b02623 100644 --- a/agilepy/testing/unittesting/config/conf/conf4.yaml +++ b/agilepy/testing/unittesting/config/conf/conf4.yaml @@ -7,7 +7,6 @@ input: output: outdir: $AGILE/agilepy-test-data/unittesting-output/config filenameprefix: testcase - logfilenameprefix: testcase sourcename: source-test username: user-test verboselvl: 1 diff --git a/agilepy/testing/unittesting/config/conf/conf_bb.yaml b/agilepy/testing/unittesting/config/conf/conf_bb.yaml index 888db8a5..8f30513c 100644 --- a/agilepy/testing/unittesting/config/conf/conf_bb.yaml +++ b/agilepy/testing/unittesting/config/conf/conf_bb.yaml @@ -1,7 +1,6 @@ output: outdir: $TEST_LOGS_DIR filenameprefix: testcase - logfilenameprefix: testcase sourcename: source-test username: user-test verboselvl: 2 diff --git a/agilepy/testing/unittesting/config/conf/conf_bb_missingkeys.yaml b/agilepy/testing/unittesting/config/conf/conf_bb_missingkeys.yaml index e9a120e8..03b4f73b 100644 --- a/agilepy/testing/unittesting/config/conf/conf_bb_missingkeys.yaml +++ b/agilepy/testing/unittesting/config/conf/conf_bb_missingkeys.yaml @@ -1,7 +1,6 @@ output: outdir: $TEST_LOGS_DIR filenameprefix: testcase - logfilenameprefix: testcase sourcename: source-test username: user-test verboselvl: 2 diff --git a/agilepy/testing/unittesting/config/conf/conf_bb_null.yaml b/agilepy/testing/unittesting/config/conf/conf_bb_null.yaml index a2439687..e2996baf 100644 --- a/agilepy/testing/unittesting/config/conf/conf_bb_null.yaml +++ b/agilepy/testing/unittesting/config/conf/conf_bb_null.yaml @@ -1,7 +1,6 @@ output: outdir: $TEST_LOGS_DIR filenameprefix: testcase - logfilenameprefix: testcase sourcename: source-test username: user-test verboselvl: 2 diff --git a/agilepy/testing/unittesting/config/conf/conf_notvalid.yaml b/agilepy/testing/unittesting/config/conf/conf_notvalid.yaml index c2e1ad6b..c1168dfd 100644 --- a/agilepy/testing/unittesting/config/conf/conf_notvalid.yaml +++ b/agilepy/testing/unittesting/config/conf/conf_notvalid.yaml @@ -7,7 +7,6 @@ input: output: outdir: $AGILE/agilepy-test-data/unittesting-output/config filenameprefix: testcase - logfilenameprefix: testcase sourcename: source-test username: user-test verboselvl: 1 diff --git a/agilepy/testing/unittesting/config/conf/conf_rm_bad.yaml b/agilepy/testing/unittesting/config/conf/conf_rm_bad.yaml index 5bc6ff7d..ad6bd743 100644 --- a/agilepy/testing/unittesting/config/conf/conf_rm_bad.yaml +++ b/agilepy/testing/unittesting/config/conf/conf_rm_bad.yaml @@ -1,7 +1,6 @@ output: outdir: $TEST_LOGS_DIR filenameprefix: testcase - logfilenameprefix: testcase sourcename: source-test username: user-test verboselvl: 2 diff --git a/agilepy/testing/unittesting/config/conf/conf_rm_missingkeys.yaml b/agilepy/testing/unittesting/config/conf/conf_rm_missingkeys.yaml index 5e0f6313..a7bfa197 100644 --- a/agilepy/testing/unittesting/config/conf/conf_rm_missingkeys.yaml +++ b/agilepy/testing/unittesting/config/conf/conf_rm_missingkeys.yaml @@ -1,7 +1,6 @@ output: outdir: $TEST_LOGS_DIR filenameprefix: testcase - logfilenameprefix: testcase sourcename: source-test username: user-test verboselvl: 2 diff --git a/agilepy/testing/unittesting/config/conf/conf_rm_null.yaml b/agilepy/testing/unittesting/config/conf/conf_rm_null.yaml index 083c8702..d9333386 100644 --- a/agilepy/testing/unittesting/config/conf/conf_rm_null.yaml +++ b/agilepy/testing/unittesting/config/conf/conf_rm_null.yaml @@ -1,7 +1,6 @@ output: outdir: $TEST_LOGS_DIR filenameprefix: testcase - logfilenameprefix: testcase sourcename: source-test username: user-test verboselvl: 2 diff --git a/agilepy/testing/unittesting/config/test_agilepy_ag_analysis_config.py b/agilepy/testing/unittesting/config/test_agilepy_ag_analysis_config.py index 26b1fe65..db801e72 100644 --- a/agilepy/testing/unittesting/config/test_agilepy_ag_analysis_config.py +++ b/agilepy/testing/unittesting/config/test_agilepy_ag_analysis_config.py @@ -26,317 +26,260 @@ #along with this program. If not, see . -from genericpath import exists import os import shutil -import unittest +import pytest from pathlib import Path from agilepy.config.AgilepyConfig import AgilepyConfig from agilepy.core.CustomExceptions import OptionNotFoundInConfigFileError, ConfigFileOptionTypeError, CannotSetHiddenOptionError, CannotSetNotUpdatableOptionError, ConfigurationsNotValidError, OptionNameNotSupportedError, DeprecatedOptionError +@pytest.fixture(autouse=True) +def clean_test_env(): + """Fixture to clean output dir before each test.""" + current_dir_path = Path(__file__).parent.absolute() + agilepyconf_path = os.path.join(current_dir_path, "conf/agilepyconf.yaml") + out_dir = Path(os.path.join(os.environ["AGILE"], "agilepy-test-data/unittesting-output/config")) + if out_dir.exists() and out_dir.is_dir(): + shutil.rmtree(out_dir) + yield -class AgilepyConfigUT(unittest.TestCase): +@pytest.mark.new +class TestAGAnalysisConfig(): - def setUp(self): - self.currentDirPath = Path(__file__).parent.absolute() - self.agilepyconfPath = os.path.join(self.currentDirPath,"conf/agilepyconf.yaml") - - outDir = Path(os.path.join(os.environ["AGILE"], "agilepy-test-data/unittesting-output/config")) - - if outDir.exists() and outDir.is_dir(): - shutil.rmtree(outDir) - - - ##### TEST NOT SUPPORTED AFTER REST FEATURE - """ - def test_validation_tmin_not_in_index(self): - - self.config = AgilepyConfig() - self.config.loadBaseConfigurations(self.agilepyconfPath) - self.config.loadConfigurationsForClass("AGAnalysis") - - self.assertRaises(ConfigurationsNotValidError, self.config.setOptions, tmin=40000000, tmax=433957532, timetype="TT") - - - - def test_validation_tmax_not_in_index(self): - - self.config = AgilepyConfig() - self.config.loadBaseConfigurations(self.agilepyconfPath) - self.config.loadConfigurationsForClass("AGAnalysis") - - self.assertRaises(ConfigurationsNotValidError, self.config.setOptions, - tmin=433900000, tmax=456537946, timetype="TT") - """ - def test_validation_min_max(self): + config = AgilepyConfig() + config.loadBaseConfigurations(os.path.join(Path(__file__).parent, "conf/agilepyconf.yaml")) + config.loadConfigurationsForClass("AGAnalysis") - self.config = AgilepyConfig() - self.config.loadBaseConfigurations(self.agilepyconfPath) - self.config.loadConfigurationsForClass("AGAnalysis") - - self.assertRaises(ConfigurationsNotValidError, self.config.setOptions, dq=0, fovradmin=10, fovradmax=0) - + with pytest.raises(ConfigurationsNotValidError): + config.setOptions(dq=0, fovradmin=10, fovradmax=0) def test_set_options(self): - - self.config = AgilepyConfig() - self.config.loadBaseConfigurations(self.agilepyconfPath) - self.config.loadConfigurationsForClass("AGAnalysis") + config = AgilepyConfig() + config.loadBaseConfigurations(os.path.join(Path(__file__).parent, "conf/agilepyconf.yaml")) + config.loadConfigurationsForClass("AGAnalysis") # float instead of int is ok. - self.assertEqual(None, self.config.setOptions(tmin=433857532., tmax=435153532., timetype="TT")) - - self.assertEqual("TT", self.config.getOptionValue("timetype")) + assert config.setOptions(tmin=433857532., tmax=435153532., timetype="TT") is None + assert config.getOptionValue("timetype") == "TT" - self.assertEqual(None, self.config.setOptions(tmin=58026.5, tmax=58027.5, timetype="MJD")) + assert config.setOptions(tmin=58026.5, tmax=58027.5, timetype="MJD") is None + assert config.getOptionValue("timetype") == "MJD" - self.assertEqual("MJD", self.config.getOptionValue("timetype")) + with pytest.raises(CannotSetNotUpdatableOptionError): + config.setOptions(tmin=58026.5) # we must pass also timetype + with pytest.raises(CannotSetNotUpdatableOptionError): + config.setOptions(verboselvl=2) + with pytest.raises(OptionNotFoundInConfigFileError): + config.setOptions(pdor="kmer") - self.assertRaises(CannotSetNotUpdatableOptionError, self.config.setOptions, tmin=58026.5) # we must pass also timetype - - self.assertRaises(CannotSetNotUpdatableOptionError, self.config.setOptions, verboselvl=2) - self.assertRaises(CannotSetNotUpdatableOptionError, self.config.setOptions, logfilenameprefix="pippo") - - self.assertRaises(OptionNotFoundInConfigFileError, self.config.setOptions, pdor="kmer") + with pytest.raises(ConfigFileOptionTypeError): + config.setOptions(minimizertype=666) + with pytest.raises(ConfigFileOptionTypeError): + config.setOptions(energybins=[1, 2, 3]) + with pytest.raises(ConfigFileOptionTypeError): + config.setOptions(energybins=666) + with pytest.raises(ConfigFileOptionTypeError): + config.setOptions(energybins="100, 300") + + # with pytest.raises(CannotSetHiddenOptionError): + # config.setOptions(lonpole=100) # deprecated - self.assertRaises(ConfigFileOptionTypeError, self.config.setOptions, minimizertype=666) - self.assertRaises(ConfigFileOptionTypeError, self.config.setOptions, energybins=[1,2,3]) - self.assertRaises(ConfigFileOptionTypeError, self.config.setOptions, energybins=666) - self.assertRaises(ConfigFileOptionTypeError, self.config.setOptions, energybins="100, 300") + # len(energybins) = 2 + with pytest.raises(ConfigFileOptionTypeError): + config.setOptions(galcoeff=0.617196) + with pytest.raises(ConfigFileOptionTypeError): + config.setOptions(isocoeff=0.617196) - #self.assertRaises(CannotSetHiddenOptionError, self.config.setOptions, lonpole=100) depreacated + with pytest.raises(ConfigurationsNotValidError): + config.setOptions(galcoeff=[0.617196]) + with pytest.raises(ConfigurationsNotValidError): + config.setOptions(isocoeff=[0.617196]) - self.assertRaises(ConfigFileOptionTypeError, self.config.setOptions, galcoeff=0.617196) - self.assertRaises(ConfigFileOptionTypeError, self.config.setOptions, isocoeff=0.617196) + with pytest.raises(ConfigFileOptionTypeError): + config.setOptions(fluxcorrection=3.14) - # len(energybins) = 2 - self.assertRaises(ConfigurationsNotValidError, self.config.setOptions, galcoeff=[0.617196]) - self.assertRaises(ConfigurationsNotValidError, self.config.setOptions, isocoeff=[0.617196]) + with pytest.raises(ConfigurationsNotValidError): + config.setOptions(fluxcorrection=25) - self.assertRaises(ConfigFileOptionTypeError, - self.config.setOptions, fluxcorrection=3.14) + with pytest.raises(DeprecatedOptionError): + config.setOptions(emin=100) - self.assertRaises(ConfigurationsNotValidError, - self.config.setOptions, fluxcorrection=25) - # Test deprecated options - self.assertRaises(DeprecatedOptionError, self.config.setOptions, emin=100) def test_validation_wrong_AGAnalysis(self): """Test that reading a not valid configuration file raises an error.""" - - self.config = AgilepyConfig() - conf_path = os.path.join(self.currentDirPath,"conf/conf_notvalid.yaml") - self.config.loadBaseConfigurations(conf_path) - - with self.assertRaises(ConfigurationsNotValidError): - self.config.loadConfigurationsForClass("AGAnalysis") + config = AgilepyConfig() + conf_path = os.path.join(Path(__file__).parent, "conf/conf_notvalid.yaml") + config.loadBaseConfigurations(conf_path) + with pytest.raises(ConfigurationsNotValidError): + config.loadConfigurationsForClass("AGAnalysis") def test_energybins(self): - self.config = AgilepyConfig() - + config = AgilepyConfig() # galcoeff and isocoeff are None - conf1Path = os.path.join(self.currentDirPath,"conf/conf1.yaml") - - self.config.loadBaseConfigurations(conf1Path) - self.config.loadConfigurationsForClass("AGAnalysis") - - self.assertEqual(100, self.config.getOptionValue("energybins")[0][0]) - self.assertEqual(300, self.config.getOptionValue("energybins")[0][1]) - self.assertEqual(300, self.config.getOptionValue("energybins")[1][0]) - self.assertEqual(1000, self.config.getOptionValue("energybins")[1][1]) + conf1Path = os.path.join(Path(__file__).parent, "conf/conf1.yaml") + config.loadBaseConfigurations(conf1Path) + config.loadConfigurationsForClass("AGAnalysis") + + assert config.getOptionValue("energybins")[0][0] == 100 + assert config.getOptionValue("energybins")[0][1] == 300 + assert config.getOptionValue("energybins")[1][0] == 300 + assert config.getOptionValue("energybins")[1][1] == 1000 - self.config.setOptions(energybins=[[200, 400], [400, 1000]]) + config.setOptions(energybins=[[200, 400], [400, 1000]]) - self.assertEqual(200, self.config.getOptionValue("energybins")[0][0]) - self.assertEqual(400, self.config.getOptionValue("energybins")[0][1]) - self.assertEqual(400, self.config.getOptionValue("energybins")[1][0]) - self.assertEqual(1000, self.config.getOptionValue("energybins")[1][1]) + assert config.getOptionValue("energybins")[0][0] == 200 + assert config.getOptionValue("energybins")[0][1] == 400 + assert config.getOptionValue("energybins")[1][0] == 400 + assert config.getOptionValue("energybins")[1][1] == 1000 # wrong type - self.assertRaises(ConfigFileOptionTypeError, self.config.setOptions, energybins=["[200, 400]", "[400, 1000]"]) - - # wrong length - # self.assertRaises(ConfigurationsNotValidError, self.config.setOptions, energybins=[[200, 400]]) + with pytest.raises(ConfigFileOptionTypeError): + config.setOptions(energybins=["[200, 400]", "[400, 1000]"]) # galcoeff and isocoeff are None and len(energybins) = 1 - conf3Path = os.path.join(self.currentDirPath,"conf/conf3.yaml") + conf3Path = os.path.join(Path(__file__).parent, "conf/conf3.yaml") + config.loadBaseConfigurations(conf3Path) + config.loadConfigurationsForClass("AGAnalysis") - self.config.loadBaseConfigurations(conf3Path) - self.config.loadConfigurationsForClass("AGAnalysis") + assert config.getOptionValue("energybins")[0][0] == 100 + assert config.getOptionValue("energybins")[0][1] == 300 - self.assertEqual(100, self.config.getOptionValue("energybins")[0][0]) - self.assertEqual(300, self.config.getOptionValue("energybins")[0][1]) - - self.config.setOptions(energybins=[[200, 400], [400, 1000]]) + config.setOptions(energybins=[[200, 400], [400, 1000]]) def test_bkg_coeff(self): - self.config = AgilepyConfig() + config = AgilepyConfig() # galcoeff and isocoeff are None - conf1Path = os.path.join(self.currentDirPath,"conf/conf1.yaml") + conf1Path = os.path.join(Path(__file__).parent, "conf/conf1.yaml") - self.config.loadBaseConfigurations(conf1Path) - self.config.loadConfigurationsForClass("AGAnalysis") + config.loadBaseConfigurations(conf1Path) + config.loadConfigurationsForClass("AGAnalysis") - self.assertEqual(4, len(self.config.getOptionValue("isocoeff"))) - self.assertEqual(4, len(self.config.getOptionValue("galcoeff"))) + assert len(config.getOptionValue("isocoeff")) == 4 + assert len(config.getOptionValue("galcoeff")) == 4 for i in range(4): - self.assertEqual(-1, self.config.getOptionValue("isocoeff")[i]) - self.assertEqual(-1, self.config.getOptionValue("galcoeff")[i]) + assert config.getOptionValue("isocoeff")[i] == -1 + assert config.getOptionValue("galcoeff")[i] == -1 # galcoeff isocoeff are lists - conf1Path = os.path.join(self.currentDirPath,"conf/conf2.yaml") + conf1Path = os.path.join(Path(__file__).parent, "conf/conf2.yaml") - self.config.loadBaseConfigurations(conf1Path) - self.config.loadConfigurationsForClass("AGAnalysis") + config.loadBaseConfigurations(conf1Path) + config.loadConfigurationsForClass("AGAnalysis") - self.assertEqual(4, len(self.config.getOptionValue("isocoeff"))) - self.assertEqual(4, len(self.config.getOptionValue("galcoeff"))) + assert len(config.getOptionValue("isocoeff")) == 4 + assert len(config.getOptionValue("galcoeff")) == 4 - self.assertEqual(10, self.config.getOptionValue("isocoeff")[0]) - self.assertEqual(15, self.config.getOptionValue("isocoeff")[1]) - self.assertEqual(0.6, self.config.getOptionValue("galcoeff")[0]) - self.assertEqual(0.8, self.config.getOptionValue("galcoeff")[1]) + assert config.getOptionValue("isocoeff")[0] == 10 + assert config.getOptionValue("isocoeff")[1] == 15 + assert config.getOptionValue("galcoeff")[0] == 0.6 + assert config.getOptionValue("galcoeff")[1] == 0.8 # galcoeff and isocoeff are changed at runtime - - self.config.setOptions(isocoeff=[10, 15, 10, 15], galcoeff=[0.6, 0.8, 0.6, 0.8]) - self.assertEqual(10, self.config.getOptionValue("isocoeff")[0]) - self.assertEqual(15, self.config.getOptionValue("isocoeff")[1]) - self.assertEqual(10, self.config.getOptionValue("isocoeff")[2]) - self.assertEqual(15, self.config.getOptionValue("isocoeff")[3]) - self.assertEqual(0.6, self.config.getOptionValue("galcoeff")[0]) - self.assertEqual(0.8, self.config.getOptionValue("galcoeff")[1]) - self.assertEqual(0.6, self.config.getOptionValue("galcoeff")[2]) - self.assertEqual(0.8, self.config.getOptionValue("galcoeff")[3]) + config.setOptions(isocoeff=[10, 15, 10, 15], galcoeff=[0.6, 0.8, 0.6, 0.8]) + assert config.getOptionValue("isocoeff") == [10, 15, 10, 15] + assert config.getOptionValue("galcoeff") == [0.6, 0.8, 0.6, 0.8] # this should cause an error because len(energybins) == 2 - self.assertRaises(ConfigurationsNotValidError, self.config.setOptions, isocoeff=[10]) - self.assertRaises(ConfigurationsNotValidError, self.config.setOptions, galcoeff=[0.6]) + with pytest.raises(ConfigurationsNotValidError): + config.setOptions(isocoeff=[10]) + with pytest.raises(ConfigurationsNotValidError): + config.setOptions(galcoeff=[0.6]) - self.assertRaises(ConfigFileOptionTypeError, self.config.setOptions, isocoeff=None, galcoeff=None) + with pytest.raises(ConfigFileOptionTypeError): + config.setOptions(isocoeff=None, galcoeff=None) - self.assertRaises(ConfigFileOptionTypeError, self.config.setOptions, isocoeff="Pluto", galcoeff="Pippo") + with pytest.raises(ConfigFileOptionTypeError): + config.setOptions(isocoeff="Pluto", galcoeff="Pippo") # this should create an error!! - self.assertRaises(ConfigFileOptionTypeError, self.config.setOptions, isocoeff=["Pluto"], galcoeff=["Pippo"]) - + with pytest.raises(ConfigFileOptionTypeError): + config.setOptions(isocoeff=["Pluto"], galcoeff=["Pippo"]) def test_complete_configuration(self): - self.config = AgilepyConfig() - - conf1Path = os.path.join(self.currentDirPath,"conf/conf1.yaml") - - self.config.loadBaseConfigurations(conf1Path) - self.config.loadConfigurationsForClass("AGAnalysis") - - self.assertEqual(5.99147, self.config.getOptionValue("loccl")) - - self.config.setOptions(loccl=99) - - self.assertEqual(9.21034, self.config.getOptionValue("loccl")) - - self.assertEqual(4, len(self.config.getOptionValue("isocoeff"))) - self.assertEqual(4, len(self.config.getOptionValue("galcoeff"))) + config = AgilepyConfig() + conf1Path = os.path.join(Path(__file__).parent, "conf/conf1.yaml") + config.loadBaseConfigurations(conf1Path) + config.loadConfigurationsForClass("AGAnalysis") + assert config.getOptionValue("loccl") == 5.99147 + config.setOptions(loccl=99) + assert config.getOptionValue("loccl") == 9.21034 + assert len(config.getOptionValue("isocoeff")) == 4 + assert len(config.getOptionValue("galcoeff")) == 4 - conf2Path = os.path.join(self.currentDirPath,"conf/conf2.yaml") - self.config.loadBaseConfigurations(conf2Path) - self.config.loadConfigurationsForClass("AGAnalysis") + conf2Path = os.path.join(Path(__file__).parent, "conf/conf2.yaml") + config.loadBaseConfigurations(conf2Path) + config.loadConfigurationsForClass("AGAnalysis") - self.assertEqual(9.21034, self.config.getOptionValue("loccl")) + assert config.getOptionValue("loccl") == 9.21034 def test_evt_log_files_env_vars(self): - self.config = AgilepyConfig() + config = AgilepyConfig() + conf1Path = os.path.join(Path(__file__).parent, "conf/conf1.yaml") + config.loadBaseConfigurations(conf1Path) + config.loadConfigurationsForClass("AGAnalysis") - conf1Path = os.path.join(self.currentDirPath,"conf/conf1.yaml") + assert "$" not in config.getOptionValue("evtfile") + assert "$" not in config.getOptionValue("logfile") - self.config.loadBaseConfigurations(conf1Path) - self.config.loadConfigurationsForClass("AGAnalysis") - - self.assertEqual(True, "$" not in self.config.getOptionValue("evtfile")) - self.assertEqual(True, "$" not in self.config.getOptionValue("logfile")) - - self.config.setOptions( - evtfile="$AGILE/agilepy-test-data/test_dataset_6.0/EVT/EVT.index", - logfile="$AGILE/agilepy-test-data/test_dataset_6.0/LOG/LOG.index" - ) - - self.assertEqual(True, "$" not in self.config.getOptionValue("evtfile")) - self.assertEqual(True, "$" not in self.config.getOptionValue("logfile")) + config.setOptions( + evtfile="$AGILE/agilepy-test-data/test_dataset_6.0/EVT/EVT.index", + logfile="$AGILE/agilepy-test-data/test_dataset_6.0/LOG/LOG.index", + ) + assert "$" not in config.getOptionValue("evtfile") + assert "$" not in config.getOptionValue("logfile") def test_datapath_restapi(self): - self.config = AgilepyConfig() + config = AgilepyConfig() - conf1Path = os.path.join(self.currentDirPath,"conf/conf1.yaml") + conf1Path = os.path.join(Path(__file__).parent, "conf/conf1.yaml") - self.config.loadBaseConfigurations(conf1Path) - self.config.loadConfigurationsForClass("AGAnalysis") + config.loadBaseConfigurations(conf1Path) + config.loadConfigurationsForClass("AGAnalysis") - self.assertRaises(CannotSetNotUpdatableOptionError, self.config.setOptions, datapath="/foo/bar") - self.assertRaises(CannotSetNotUpdatableOptionError, self.config.setOptions, userestapi=True) + with pytest.raises(CannotSetNotUpdatableOptionError): + config.setOptions(datapath="/foo/bar") + with pytest.raises(CannotSetNotUpdatableOptionError): + config.setOptions(userestapi=True) - def test_set_evtlog_ifdatapath(self): - self.config = AgilepyConfig() + def test_set_evtlog_ifdatapath(self, tmp_path): + config = AgilepyConfig() - conf1Path = os.path.join(self.currentDirPath,"conf/conf4.yaml") + conf1Path = os.path.join(Path(__file__).parent, "conf/conf4.yaml") - dirpath = Path("/tmp/foo/bar") + dirpath = tmp_path / "foo" / "bar" dirpath.mkdir(parents=True, exist_ok=True) - self.config.loadBaseConfigurations(conf1Path) - self.config.loadConfigurationsForClass("AGAnalysis") + config.loadBaseConfigurations(conf1Path) + config.loadConfigurationsForClass("AGAnalysis") - self.assertEqual(self.config.getOptionValue("evtfile"), Path(self.config.getOptionValue("datapath")).joinpath("EVT.index")) - self.assertEqual(self.config.getOptionValue("logfile"), Path(self.config.getOptionValue("datapath")).joinpath("LOG.index")) + assert config.getOptionValue("evtfile") == Path(config.getOptionValue("datapath")).joinpath("EVT.index") + assert config.getOptionValue("logfile") == Path(config.getOptionValue("datapath")).joinpath("LOG.index") dirpath.rmdir() - ##### TEST NOT SUPPORTED AFTER REST FEATURE - """ - def test_validation_tmin_not_in_index(self): - - self.config = AgilepyConfig() - self.config.loadBaseConfigurations(self.agilepyconfPath) - self.config.loadConfigurationsForClass("AGAnalysis") - - self.assertRaises(ConfigurationsNotValidError, self.config.setOptions, tmin=40000000, tmax=433957532, timetype="TT") - - - - def test_validation_tmax_not_in_index(self): - - self.config = AgilepyConfig() - self.config.loadBaseConfigurations(self.agilepyconfPath) - self.config.loadConfigurationsForClass("AGAnalysis") - - self.assertRaises(ConfigurationsNotValidError, self.config.setOptions, - tmin=433900000, tmax=456537946, timetype="TT") - """ - -if __name__ == '__main__': - unittest.main() diff --git a/agilepy/testing/unittesting/core/conf/agilepyconf.yaml b/agilepy/testing/unittesting/core/conf/agilepyconf.yaml index 498a4161..59bfea7b 100644 --- a/agilepy/testing/unittesting/core/conf/agilepyconf.yaml +++ b/agilepy/testing/unittesting/core/conf/agilepyconf.yaml @@ -7,7 +7,6 @@ input: output: outdir: $TEST_LOGS_DIR filenameprefix: testcase - logfilenameprefix: testcase sourcename: source-test username: user-test verboselvl: 1 diff --git a/agilepy/testing/unittesting/core/conf/test_download_data_config.yaml b/agilepy/testing/unittesting/core/conf/test_download_data_config.yaml index b18c722e..ffecfe22 100644 --- a/agilepy/testing/unittesting/core/conf/test_download_data_config.yaml +++ b/agilepy/testing/unittesting/core/conf/test_download_data_config.yaml @@ -7,7 +7,6 @@ input: output: outdir: $TEST_LOGS_DIR filenameprefix: testcase - logfilenameprefix: logtestcase sourcename: vela username: unittesting verboselvl: 1 diff --git a/agilepy/testing/unittesting/core/test_source.py b/agilepy/testing/unittesting/core/test_source.py index c4008186..57aeeb58 100644 --- a/agilepy/testing/unittesting/core/test_source.py +++ b/agilepy/testing/unittesting/core/test_source.py @@ -25,17 +25,10 @@ #You should have received a copy of the GNU General Public License #along with this program. If not, see . -import os -import shutil import pytest -import unittest -from pathlib import Path from xml.etree.ElementTree import parse from agilepy.core.source.Source import Source, PointSource -from agilepy.core.AgilepyLogger import AgilepyLogger -from agilepy.config.AgilepyConfig import AgilepyConfig -from agilepy.core.SourcesLibrary import SourcesLibrary from agilepy.core.source.Spectrum import Spectrum from agilepy.core.CustomExceptions import SourceParameterNotFound diff --git a/agilepy/testing/unittesting/core/test_sources_library.py b/agilepy/testing/unittesting/core/test_sources_library.py index 3d4300f4..9797ee67 100644 --- a/agilepy/testing/unittesting/core/test_sources_library.py +++ b/agilepy/testing/unittesting/core/test_sources_library.py @@ -26,10 +26,7 @@ #along with this program. If not, see . -import os -import shutil import pytest -import unittest from pathlib import Path from xml.etree.ElementTree import parse diff --git a/agilepy/testing/unittesting/utils/conf/agilepyconf.yaml b/agilepy/testing/unittesting/utils/conf/agilepyconf.yaml index 237924c5..4e23962c 100644 --- a/agilepy/testing/unittesting/utils/conf/agilepyconf.yaml +++ b/agilepy/testing/unittesting/utils/conf/agilepyconf.yaml @@ -7,7 +7,6 @@ input: output: outdir: $TEST_LOGS_DIR filenameprefix: utils-testcase - logfilenameprefix: utils-testcase sourcename: source-test username: user-test verboselvl: 1 diff --git a/agilepy/testing/unittesting/utils/test_utils.py b/agilepy/testing/unittesting/utils/test_utils.py index af266cf4..de037bf2 100644 --- a/agilepy/testing/unittesting/utils/test_utils.py +++ b/agilepy/testing/unittesting/utils/test_utils.py @@ -26,10 +26,8 @@ #along with this program. If not, see . import os -import shutil import pytest import logging -import unittest from time import sleep from pathlib import Path from datetime import datetime diff --git a/docs/source/_static/notebooks/3C454d3-final.html b/docs/source/_static/notebooks/3C454d3-final.html index c513041d..69695967 100644 --- a/docs/source/_static/notebooks/3C454d3-final.html +++ b/docs/source/_static/notebooks/3C454d3-final.html @@ -14859,7 +14859,6 @@

Obtaining the AGAnalysis objectAnalysis

-
/root/agilepy_analysis/username_3C454_3_20221022-165046/maps/0/analysis_product_TN216691200.0_TX217382400.0_EN00100_EX50000_ID01.cts.gz /root/agilepy_analysis/username_3C454_3_20221022-165046/maps/0/analysis_product_TN216691200.0_TX217382400.0_EN00100_EX50000_ID01.exp.gz /root/agilepy_analysis/username_3C454_3_20221022-165046/maps/0/analysis_product_TN216691200.0_TX217382400.0_EN00100_EX50000_ID01.gas.gz 30 -1 -1
+
/root/agilepy_analysis/username_3C454_3_20221022-165046/maps/0/analysis_product_TN216691200.0_TX217382400.0_EN00100_EX50000_ID01.cts.gz /root/agilepy_analysis/username_3C454_3_20221022-165046/maps/0/analysis_product_TN216691200.0_TX217382400.0_EN00100_EX50000_ID01.exp.gz /root/agilepy_analysis/username_3C454_3_20221022-165046/maps/0/analysis_product_TN216691200.0_TX217382400.0_EN00100_EX50000_ID01.gas.gz 30 -1 -1
 
@@ -16239,15 +16238,15 @@

Light curve with default tmin an @@ -17350,11 +17349,11 @@

Eval @@ -17997,15 +17996,15 @@

Merge light curves -
time_start_mjd time_end_mjd sqrt(ts) flux flux_err flux_ul gal gal_error iso iso_error l_peak b_peak dist_peak l b r ell_dist a b phi exposure ExpRatio counts counts_err Index Index_Err Par2 Par2_Err Par3 Par3_Err Erglog Erglog_Err Erglog_UL time_start_utc time_end_utc time_start_tt time_end_tt Fix index ULConfidenceLevel SrcLocConfLevel start_l start_b start_flux typefun par2 par3 galmode2 galmode2fit isomode2 isomode2fit edpcor fluxcor integratortype expratioEval expratio_minthr expratio_maxthr expratio_size Emin emax fovmin fovmax albedo binsize expstep phasecode fit_cts fit_fitstatus0 fit_fcn0 fit_edm0 fit_nvpar0 fit_nparx0 fit_iter0 fit_fitstatus1 fit_fcn1 fit_edm1 fit_nvpar1 fit_nparx1 fit_iter1 fit_Likelihood1
-55513.0 55514.0 4.32035 642.979e-08 232.549e-08 1180.75e-08 0.7 0 10.991 0.508972 85.9102 -37.9369 0.297486 86.2013 1.1427 1.08087 0.0702603 0.887659 1.1427 28.6357 3364190.0 0 21.631 7.82338 2.51349 0 0 0 0 0 1.03083e-09 3.72824e-10 1.89299e-09 2010-11-13T00:00:00.000 2010-11-14T00:00:00.000 216691200.0 216777600.0 3 2.51349 2 5.99147 86.1236 -38.1824 8.75337e-06 0 0 0 0 0 0 0 1 0 1 1 0 15 10 100 50000 0 60 80 0.5 0 6 58 0 182.447 1.18453e-09 1 8 25 0 173.114 6.88593e-07 2 8 25 226.956
-55514.0 55515.0 5.36336 786.759e-08 225.657e-08 1298.53e-08 0.7 0 5.54233 0.524937 85.5303 -37.8277 0.586852 85.2635 0.941887 1.19558 0.775158 1.35608 0.941887 14.6594 3535790.0 0 27.8182 7.97875 2.51349 0 0 0 0 0 1.26134e-09 3.61775e-10 2.08181e-09 2010-11-14T00:00:00.000 2010-11-15T00:00:00.000 216777600.0 216864000.0 3 2.51349 2 5.99147 86.1236 -38.1824 8.75337e-06 0 0 0 0 0 0 0 1 0 1 1 0 15 10 100 50000 0 60 80 0.5 0 6 46 0 152.285 2.30385e-10 1 8 30 0 137.902 1.83574e-09 2 8 30 183.902
-55515.0 55516.0 5.3458 944.251e-08 270.486e-08 1553.45e-08 0.7 0 12.6982 0.516907 86.0458 -38.325 0.155178 86.3895 1.03513 1.02488 0.458338 0.896505 1.03513 63.9542 3417240.0 0 32.2673 9.24315 2.51349 0 0 0 0 0 1.51383e-09 4.33645e-10 2.4905e-09 2010-11-15T00:00:00.000 2010-11-16T00:00:00.000 216864000.0 216950400.0 3 2.51349 2 5.99147 86.1236 -38.1824 8.75337e-06 0 0 0 0 0 0 0 1 0 1 1 0 15 10 100 50000 0 60 80 0.5 0 6 73 0 213.424 2.14724e-08 1 8 25 0 199.135 2.1518e-09 2 8 25 266.59
-55516.0 55517.0 5.46583 1003.54e-08 277.996e-08 1622.63e-08 0.7 0 13.2396 0.538427 86.4269 -37.9295 0.347829 86.2991 0.673445 0.842059 0.375079 0.941951 0.673445 74.8598 3559640.0 0 35.7224 9.89566 2.51349 0 0 0 0 0 1.60888e-09 4.45685e-10 2.60142e-09 2010-11-16T00:00:00.000 2010-11-17T00:00:00.000 216950400.0 217036800.0 3 2.51349 2 5.99147 86.1236 -38.1824 8.75337e-06 0 0 0 0 0 0 0 1 0 1 1 0 15 10 100 50000 0 60 80 0.5 0 6 80 0 227.167 2.47288e-07 1 8 25 0 212.229 5.3908e-09 2 8 25 285.297
-55517.0 55518.0 13.1053 3734.65e-08 531.808e-08 4880.65e-08 0.7 0 6.1927 0.499738 86.2441 -38.083 0.161214 86.2403 0.315681 0.353646 0.168543 0.341006 0.315681 -0.192557 2163990.0 0 80.8174 11.5082 2.07417 0 0 0 0 0 5.98742e-09 8.52597e-10 7.82469e-09 2010-11-17T00:00:00.000 2010-11-18T00:00:00.000 217036800.0 217123200.0 3 2.07417 2 5.99147 86.0861 -38.1857 4.31859e-05 0 0 0 0 0 0 0 1 0 1 1 0 15 10 100 50000 0 60 80 0.5 0 6 89 0 264.492 4.85487e-10 1 8 32 0 178.617 8.39699e-07 2 8 32 237.476
-55518.0 55519.0 19.1765 4671.39e-08 427.706e-08 5570.3e-08 0.7 0 6.39072 0.437794 86.0691 -38.2228 0.0394434 86.0549 0.287045 0.263238 0.0898637 0.204302 0.287045 11.199 3811480.0 0 178.049 16.3019 2.07417 0 0 0 0 0 7.4892e-09 6.85702e-10 8.93033e-09 2010-11-18T00:00:00.000 2010-11-19T00:00:00.000 217123200.0 217209600.0 3 2.07417 2 5.99147 86.0861 -38.1857 4.31859e-05 0 0 0 0 0 0 0 1 0 1 1 0 15 10 100 50000 0 60 80 0.5 0 6 190 0 451.806 3.6681e-10 1 8 27 0 267.937 4.56625e-12 2 8 27 364.096
-55519.0 55520.0 18.5179 4495.2e-08 443.196e-08 5429.8e-08 0.7 0 15.9092 0.433659 85.9694 -38.2509 0.112471 85.9189 0.281349 0.250222 0.151572 0.190268 0.281349 83.4971 3713430.0 0 166.926 16.4578 2.07417 0 0 0 0 0 7.20673e-09 7.10535e-10 8.7051e-09 2010-11-19T00:00:00.000 2010-11-20T00:00:00.000 217209600.0 217296000.0 3 2.07417 2 5.99147 86.0861 -38.1857 4.31859e-05 0 0 0 0 0 0 0 1 0 1 1 0 15 10 100 50000 0 60 80 0.5 0 6 214 0 482.082 8.05123e-10 1 8 30 0 310.627 1.64936e-09 2 8 30 421.583
-55520.0 55521.0 19.3112 4666.43e-08 448.328e-08 5612.13e-08 0.7 0 7.78736 0.425641 86.1123 -38.1832 0.0207589 -1 -1 -1 -1 -1 -1 -1 3475880.0 0 162.199 15.5833 2.07417 0 0 0 0 0 7.48125e-09 7.18763e-10 8.9974e-09 2010-11-20T00:00:00.000 2010-11-21T00:00:00.000 217296000.0 217382400.0 3 2.07417 2 5.99147 86.0861 -38.1857 4.31859e-05 0 0 0 0 0 0 0 1 0 1 1 0 15 10 100 50000 0 60 80 0.5 0 6 178 0 448.111 2.02693e-09 1 8 27 0 261.65 5.33366e-07 2 8 27 339.758
+
time_start_mjd time_end_mjd sqrt(ts) flux flux_err flux_ul gal gal_error iso iso_error l_peak b_peak dist_peak l b r ell_dist a b phi exposure ExpRatio counts counts_err Index Index_Err Par2 Par2_Err Par3 Par3_Err Erglog Erglog_Err Erglog_UL time_start_utc time_end_utc time_start_tt time_end_tt Fix index ULConfidenceLevel SrcLocConfLevel start_l start_b start_flux typefun par2 par3 galmode2 galmode2fit isomode2 isomode2fit edpcor fluxcor integratortype expratioEval expratio_minthr expratio_maxthr expratio_size Emin emax fovmin fovmax albedo binsize expstep phasecode fit_cts fit_fitstatus0 fit_fcn0 fit_edm0 fit_nvpar0 fit_nparx0 fit_iter0 fit_fitstatus1 fit_fcn1 fit_edm1 fit_nvpar1 fit_nparx1 fit_iter1 fit_Likelihood1
+55513.0 55514.0 4.32035 642.979e-08 232.549e-08 1180.75e-08 0.7 0 10.991 0.508972 85.9102 -37.9369 0.297486 86.2013 1.1427 1.08087 0.0702603 0.887659 1.1427 28.6357 3364190.0 0 21.631 7.82338 2.51349 0 0 0 0 0 1.03083e-09 3.72824e-10 1.89299e-09 2010-11-13T00:00:00.000 2010-11-14T00:00:00.000 216691200.0 216777600.0 3 2.51349 2 5.99147 86.1236 -38.1824 8.75337e-06 0 0 0 0 0 0 0 1 0 1 1 0 15 10 100 50000 0 60 80 0.5 0 6 58 0 182.447 1.18453e-09 1 8 25 0 173.114 6.88593e-07 2 8 25 226.956
+55514.0 55515.0 5.36336 786.759e-08 225.657e-08 1298.53e-08 0.7 0 5.54233 0.524937 85.5303 -37.8277 0.586852 85.2635 0.941887 1.19558 0.775158 1.35608 0.941887 14.6594 3535790.0 0 27.8182 7.97875 2.51349 0 0 0 0 0 1.26134e-09 3.61775e-10 2.08181e-09 2010-11-14T00:00:00.000 2010-11-15T00:00:00.000 216777600.0 216864000.0 3 2.51349 2 5.99147 86.1236 -38.1824 8.75337e-06 0 0 0 0 0 0 0 1 0 1 1 0 15 10 100 50000 0 60 80 0.5 0 6 46 0 152.285 2.30385e-10 1 8 30 0 137.902 1.83574e-09 2 8 30 183.902
+55515.0 55516.0 5.3458 944.251e-08 270.486e-08 1553.45e-08 0.7 0 12.6982 0.516907 86.0458 -38.325 0.155178 86.3895 1.03513 1.02488 0.458338 0.896505 1.03513 63.9542 3417240.0 0 32.2673 9.24315 2.51349 0 0 0 0 0 1.51383e-09 4.33645e-10 2.4905e-09 2010-11-15T00:00:00.000 2010-11-16T00:00:00.000 216864000.0 216950400.0 3 2.51349 2 5.99147 86.1236 -38.1824 8.75337e-06 0 0 0 0 0 0 0 1 0 1 1 0 15 10 100 50000 0 60 80 0.5 0 6 73 0 213.424 2.14724e-08 1 8 25 0 199.135 2.1518e-09 2 8 25 266.59
+55516.0 55517.0 5.46583 1003.54e-08 277.996e-08 1622.63e-08 0.7 0 13.2396 0.538427 86.4269 -37.9295 0.347829 86.2991 0.673445 0.842059 0.375079 0.941951 0.673445 74.8598 3559640.0 0 35.7224 9.89566 2.51349 0 0 0 0 0 1.60888e-09 4.45685e-10 2.60142e-09 2010-11-16T00:00:00.000 2010-11-17T00:00:00.000 216950400.0 217036800.0 3 2.51349 2 5.99147 86.1236 -38.1824 8.75337e-06 0 0 0 0 0 0 0 1 0 1 1 0 15 10 100 50000 0 60 80 0.5 0 6 80 0 227.167 2.47288e-07 1 8 25 0 212.229 5.3908e-09 2 8 25 285.297
+55517.0 55518.0 13.1053 3734.65e-08 531.808e-08 4880.65e-08 0.7 0 6.1927 0.499738 86.2441 -38.083 0.161214 86.2403 0.315681 0.353646 0.168543 0.341006 0.315681 -0.192557 2163990.0 0 80.8174 11.5082 2.07417 0 0 0 0 0 5.98742e-09 8.52597e-10 7.82469e-09 2010-11-17T00:00:00.000 2010-11-18T00:00:00.000 217036800.0 217123200.0 3 2.07417 2 5.99147 86.0861 -38.1857 4.31859e-05 0 0 0 0 0 0 0 1 0 1 1 0 15 10 100 50000 0 60 80 0.5 0 6 89 0 264.492 4.85487e-10 1 8 32 0 178.617 8.39699e-07 2 8 32 237.476
+55518.0 55519.0 19.1765 4671.39e-08 427.706e-08 5570.3e-08 0.7 0 6.39072 0.437794 86.0691 -38.2228 0.0394434 86.0549 0.287045 0.263238 0.0898637 0.204302 0.287045 11.199 3811480.0 0 178.049 16.3019 2.07417 0 0 0 0 0 7.4892e-09 6.85702e-10 8.93033e-09 2010-11-18T00:00:00.000 2010-11-19T00:00:00.000 217123200.0 217209600.0 3 2.07417 2 5.99147 86.0861 -38.1857 4.31859e-05 0 0 0 0 0 0 0 1 0 1 1 0 15 10 100 50000 0 60 80 0.5 0 6 190 0 451.806 3.6681e-10 1 8 27 0 267.937 4.56625e-12 2 8 27 364.096
+55519.0 55520.0 18.5179 4495.2e-08 443.196e-08 5429.8e-08 0.7 0 15.9092 0.433659 85.9694 -38.2509 0.112471 85.9189 0.281349 0.250222 0.151572 0.190268 0.281349 83.4971 3713430.0 0 166.926 16.4578 2.07417 0 0 0 0 0 7.20673e-09 7.10535e-10 8.7051e-09 2010-11-19T00:00:00.000 2010-11-20T00:00:00.000 217209600.0 217296000.0 3 2.07417 2 5.99147 86.0861 -38.1857 4.31859e-05 0 0 0 0 0 0 0 1 0 1 1 0 15 10 100 50000 0 60 80 0.5 0 6 214 0 482.082 8.05123e-10 1 8 30 0 310.627 1.64936e-09 2 8 30 421.583
+55520.0 55521.0 19.3112 4666.43e-08 448.328e-08 5612.13e-08 0.7 0 7.78736 0.425641 86.1123 -38.1832 0.0207589 -1 -1 -1 -1 -1 -1 -1 3475880.0 0 162.199 15.5833 2.07417 0 0 0 0 0 7.48125e-09 7.18763e-10 8.9974e-09 2010-11-20T00:00:00.000 2010-11-21T00:00:00.000 217296000.0 217382400.0 3 2.07417 2 5.99147 86.0861 -38.1857 4.31859e-05 0 0 0 0 0 0 0 1 0 1 1 0 15 10 100 50000 0 60 80 0.5 0 6 178 0 448.111 2.02693e-09 1 8 27 0 261.65 5.33366e-07 2 8 27 339.758
 
diff --git a/docs/source/_static/notebooks/BayesianBlocks_tutorial.html b/docs/source/_static/notebooks/BayesianBlocks_tutorial.html new file mode 100644 index 00000000..3b69cc7c --- /dev/null +++ b/docs/source/_static/notebooks/BayesianBlocks_tutorial.html @@ -0,0 +1,16460 @@ + + + + + +BayesianBlocks_tutorial + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + diff --git a/docs/source/_static/notebooks/PKS1510-089_2009.html b/docs/source/_static/notebooks/PKS1510-089_2009.html index 88210479..a02c65bf 100644 --- a/docs/source/_static/notebooks/PKS1510-089_2009.html +++ b/docs/source/_static/notebooks/PKS1510-089_2009.html @@ -14886,7 +14886,6 @@

Obtaining the AGAnalysis objectLight curve with default tmin an diff --git a/docs/source/_static/notebooks/Ratemeters_tutorial.html b/docs/source/_static/notebooks/Ratemeters_tutorial.html new file mode 100644 index 00000000..5d47d1b1 --- /dev/null +++ b/docs/source/_static/notebooks/Ratemeters_tutorial.html @@ -0,0 +1,16344 @@ + + + + + +Ratemeters_tutorial + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/source/_static/notebooks/VELA.html b/docs/source/_static/notebooks/VELA.html index 4ff27462..a42f05a3 100644 --- a/docs/source/_static/notebooks/VELA.html +++ b/docs/source/_static/notebooks/VELA.html @@ -14891,7 +14891,6 @@

API: configuration fileLight curve @@ -18465,126 +18464,126 @@

Aperture Photometry -
433857532.0 433861132.0 163966.55 0 
-433861132.0 433864732.0 79051.27 0 
-433864732.0 433868332.0 222291.92 3 
-433868332.0 433871932.0 124952.15 1 
-433871932.0 433875532.0 82674.74 1 
-433875532.0 433879132.0 248922.49 3 
-433879132.0 433882732.0 72540.14 2 
-433882732.0 433886332.0 205541.84 1 
-433886332.0 433889932.0 224762.32 1 
-433889932.0 433893532.0 92971.98 1 
-433893532.0 433897132.0 282159.50 2 
-433897132.0 433900732.0 161665.02 2 
-433900732.0 433904332.0 117541.07 1 
-433904332.0 433907932.0 322960.54 2 
-433907932.0 433911532.0 131259.96 2 
-433911532.0 433915132.0 169328.03 0 
-433915132.0 433918732.0 256623.00 3 
-433918732.0 433922332.0 34305.35 0 
-433922332.0 433925932.0 215591.35 0 
-433925932.0 433929532.0 179317.12 3 
-433929532.0 433933132.0 136096.58 1 
-433933132.0 433936732.0 204434.05 1 
-433936732.0 433940332.0 122829.65 1 
-433940332.0 433943932.0 114408.54 3 
-433943932.0 433947532.0 237292.69 2 
-433947532.0 433951132.0 142309.75 0 
-433951132.0 433954732.0 74501.66 1 
-433954732.0 433958332.0 212654.44 0 
-433958332.0 433961932.0 97756.11 2 
-433961932.0 433965532.0 151709.36 1 
-433965532.0 433969132.0 213108.45 3 
-433969132.0 433972732.0 83285.72 0 
-433972732.0 433976332.0 253470.58 1 
-433976332.0 433979932.0 211059.30 3 
-433979932.0 433983532.0 130823.15 1 
-433983532.0 433987132.0 271935.90 3 
-433987132.0 433990732.0 122762.61 0 
-433990732.0 433994332.0 174535.06 0 
-433994332.0 433997932.0 298343.85 3 
-433997932.0 434001532.0 88410.96 0 
-434001532.0 434005132.0 218154.64 0 
-434005132.0 434008732.0 212744.04 2 
-434008732.0 434012332.0 83927.18 0 
-434012332.0 434015932.0 223713.87 6 
-434015932.0 434019532.0 168459.43 0 
-434019532.0 434023132.0 125221.63 1 
-434023132.0 434026732.0 211054.85 5 
-434026732.0 434030332.0 117049.45 1 
-434030332.0 434033932.0 88600.91 0 
-434033932.0 434037532.0 251330.89 3 
-434037532.0 434041132.0 120564.22 0 
-434041132.0 434044732.0 86891.09 1 
-434044732.0 434048332.0 226131.35 0 
-434048332.0 434051932.0 74688.92 1 
-434051932.0 434055532.0 194368.68 2 
-434055532.0 434059132.0 197891.42 3 
-434059132.0 434062732.0 145465.76 2 
-434062732.0 434066332.0 268694.53 2 
-434066332.0 434069932.0 173918.55 2 
-434069932.0 434073532.0 139096.50 1 
-434073532.0 434077132.0 301584.55 5 
-434077132.0 434080732.0 119217.12 0 
-434080732.0 434084332.0 165177.16 1 
-434084332.0 434087932.0 237725.83 0 
-434087932.0 434091532.0 73409.52 1 
-434091532.0 434095132.0 216167.58 1 
-434095132.0 434098732.0 148920.65 2 
-434098732.0 434102332.0 99830.56 1 
-434102332.0 434105932.0 181063.02 0 
-434105932.0 434109532.0 109685.66 2 
-434109532.0 434113132.0 131412.51 0 
-434113132.0 434116732.0 272096.25 4 
-434116732.0 434120332.0 121806.07 1 
-434120332.0 434123932.0 63449.82 1 
-434123932.0 434127532.0 219525.52 2 
-434127532.0 434131132.0 122860.73 0 
-434131132.0 434134732.0 131316.13 2 
-434134732.0 434138332.0 230452.92 0 
-434138332.0 434141932.0 84767.49 2 
-434141932.0 434145532.0 260401.16 2 
-434145532.0 434149132.0 212796.68 0 
-434149132.0 434152732.0 103917.15 1 
-434152732.0 434156332.0 303023.52 3 
-434156332.0 434159932.0 156435.40 2 
-434159932.0 434163532.0 143513.99 1 
-434163532.0 434167132.0 302959.27 2 
-434167132.0 434170732.0 115152.67 0 
-434170732.0 434174332.0 202823.59 3 
-434174332.0 434177932.0 220312.36 2 
-434177932.0 434181532.0 44688.74 1 
-434181532.0 434185132.0 225093.94 1 
-434185132.0 434188732.0 184473.83 1 
-434188732.0 434192332.0 121110.93 0 
-434192332.0 434195932.0 244250.17 4 
-434195932.0 434199532.0 132818.39 2 
-434199532.0 434203132.0 112874.57 1 
-434203132.0 434206732.0 212542.28 0 
-434206732.0 434210332.0 126377.13 2 
-434210332.0 434213932.0 79615.04 0 
-434213932.0 434217532.0 229896.45 3 
-434217532.0 434221132.0 84485.46 0 
-434221132.0 434224732.0 186302.08 1 
-434224732.0 434228332.0 208854.94 3 
-434228332.0 434231932.0 124951.56 1 
-434231932.0 434235532.0 264953.76 1 
-434235532.0 434239132.0 168294.21 1 
-434239132.0 434242732.0 119351.54 0 
-434242732.0 434246332.0 338835.79 1 
-434246332.0 434249932.0 108649.67 1 
-434249932.0 434253532.0 183795.17 1 
-434253532.0 434257132.0 233491.18 5 
-434257132.0 434260732.0 87483.43 1 
-434260732.0 434264332.0 224055.59 2 
-434264332.0 434267932.0 82713.39 0 
-434267932.0 434271532.0 137192.32 1 
-434271532.0 434275132.0 200398.88 0 
-434275132.0 434278732.0 126903.48 2 
-434278732.0 434282332.0 120940.45 1 
-434282332.0 434285932.0 243282.00 4 
-434285932.0 434289532.0 149989.82 1 
+
433857532.0 433861132.0 163966.55 0 
+433861132.0 433864732.0 79051.27 0 
+433864732.0 433868332.0 222291.92 3 
+433868332.0 433871932.0 124952.15 1 
+433871932.0 433875532.0 82674.74 1 
+433875532.0 433879132.0 248922.49 3 
+433879132.0 433882732.0 72540.14 2 
+433882732.0 433886332.0 205541.84 1 
+433886332.0 433889932.0 224762.32 1 
+433889932.0 433893532.0 92971.98 1 
+433893532.0 433897132.0 282159.50 2 
+433897132.0 433900732.0 161665.02 2 
+433900732.0 433904332.0 117541.07 1 
+433904332.0 433907932.0 322960.54 2 
+433907932.0 433911532.0 131259.96 2 
+433911532.0 433915132.0 169328.03 0 
+433915132.0 433918732.0 256623.00 3 
+433918732.0 433922332.0 34305.35 0 
+433922332.0 433925932.0 215591.35 0 
+433925932.0 433929532.0 179317.12 3 
+433929532.0 433933132.0 136096.58 1 
+433933132.0 433936732.0 204434.05 1 
+433936732.0 433940332.0 122829.65 1 
+433940332.0 433943932.0 114408.54 3 
+433943932.0 433947532.0 237292.69 2 
+433947532.0 433951132.0 142309.75 0 
+433951132.0 433954732.0 74501.66 1 
+433954732.0 433958332.0 212654.44 0 
+433958332.0 433961932.0 97756.11 2 
+433961932.0 433965532.0 151709.36 1 
+433965532.0 433969132.0 213108.45 3 
+433969132.0 433972732.0 83285.72 0 
+433972732.0 433976332.0 253470.58 1 
+433976332.0 433979932.0 211059.30 3 
+433979932.0 433983532.0 130823.15 1 
+433983532.0 433987132.0 271935.90 3 
+433987132.0 433990732.0 122762.61 0 
+433990732.0 433994332.0 174535.06 0 
+433994332.0 433997932.0 298343.85 3 
+433997932.0 434001532.0 88410.96 0 
+434001532.0 434005132.0 218154.64 0 
+434005132.0 434008732.0 212744.04 2 
+434008732.0 434012332.0 83927.18 0 
+434012332.0 434015932.0 223713.87 6 
+434015932.0 434019532.0 168459.43 0 
+434019532.0 434023132.0 125221.63 1 
+434023132.0 434026732.0 211054.85 5 
+434026732.0 434030332.0 117049.45 1 
+434030332.0 434033932.0 88600.91 0 
+434033932.0 434037532.0 251330.89 3 
+434037532.0 434041132.0 120564.22 0 
+434041132.0 434044732.0 86891.09 1 
+434044732.0 434048332.0 226131.35 0 
+434048332.0 434051932.0 74688.92 1 
+434051932.0 434055532.0 194368.68 2 
+434055532.0 434059132.0 197891.42 3 
+434059132.0 434062732.0 145465.76 2 
+434062732.0 434066332.0 268694.53 2 
+434066332.0 434069932.0 173918.55 2 
+434069932.0 434073532.0 139096.50 1 
+434073532.0 434077132.0 301584.55 5 
+434077132.0 434080732.0 119217.12 0 
+434080732.0 434084332.0 165177.16 1 
+434084332.0 434087932.0 237725.83 0 
+434087932.0 434091532.0 73409.52 1 
+434091532.0 434095132.0 216167.58 1 
+434095132.0 434098732.0 148920.65 2 
+434098732.0 434102332.0 99830.56 1 
+434102332.0 434105932.0 181063.02 0 
+434105932.0 434109532.0 109685.66 2 
+434109532.0 434113132.0 131412.51 0 
+434113132.0 434116732.0 272096.25 4 
+434116732.0 434120332.0 121806.07 1 
+434120332.0 434123932.0 63449.82 1 
+434123932.0 434127532.0 219525.52 2 
+434127532.0 434131132.0 122860.73 0 
+434131132.0 434134732.0 131316.13 2 
+434134732.0 434138332.0 230452.92 0 
+434138332.0 434141932.0 84767.49 2 
+434141932.0 434145532.0 260401.16 2 
+434145532.0 434149132.0 212796.68 0 
+434149132.0 434152732.0 103917.15 1 
+434152732.0 434156332.0 303023.52 3 
+434156332.0 434159932.0 156435.40 2 
+434159932.0 434163532.0 143513.99 1 
+434163532.0 434167132.0 302959.27 2 
+434167132.0 434170732.0 115152.67 0 
+434170732.0 434174332.0 202823.59 3 
+434174332.0 434177932.0 220312.36 2 
+434177932.0 434181532.0 44688.74 1 
+434181532.0 434185132.0 225093.94 1 
+434185132.0 434188732.0 184473.83 1 
+434188732.0 434192332.0 121110.93 0 
+434192332.0 434195932.0 244250.17 4 
+434195932.0 434199532.0 132818.39 2 
+434199532.0 434203132.0 112874.57 1 
+434203132.0 434206732.0 212542.28 0 
+434206732.0 434210332.0 126377.13 2 
+434210332.0 434213932.0 79615.04 0 
+434213932.0 434217532.0 229896.45 3 
+434217532.0 434221132.0 84485.46 0 
+434221132.0 434224732.0 186302.08 1 
+434224732.0 434228332.0 208854.94 3 
+434228332.0 434231932.0 124951.56 1 
+434231932.0 434235532.0 264953.76 1 
+434235532.0 434239132.0 168294.21 1 
+434239132.0 434242732.0 119351.54 0 
+434242732.0 434246332.0 338835.79 1 
+434246332.0 434249932.0 108649.67 1 
+434249932.0 434253532.0 183795.17 1 
+434253532.0 434257132.0 233491.18 5 
+434257132.0 434260732.0 87483.43 1 
+434260732.0 434264332.0 224055.59 2 
+434264332.0 434267932.0 82713.39 0 
+434267932.0 434271532.0 137192.32 1 
+434271532.0 434275132.0 200398.88 0 
+434275132.0 434278732.0 126903.48 2 
+434278732.0 434282332.0 120940.45 1 
+434282332.0 434285932.0 243282.00 4 
+434285932.0 434289532.0 149989.82 1 
 
diff --git a/docs/source/_static/notebooks/aitoff_maps.html b/docs/source/_static/notebooks/aitoff_maps.html index 96a3c2fc..5550035c 100644 --- a/docs/source/_static/notebooks/aitoff_maps.html +++ b/docs/source/_static/notebooks/aitoff_maps.html @@ -14866,7 +14866,6 @@

Aitoff configurations and display`_: it shows how to use the Agilepy's wavelet analysis API. - engineering_api_tutorial: they show how to use the Agilepy's engineering analysis API. -- `Bayesian Blocks analysis <../_static/notebooks/BayesianBlocks_tutorial.ipynb>`_: run the Bayesian Blocks algorithm on AGILE light curves produced by Maximum Likelihood or Aperture Photometry algorithms, or on unbinnned data. -- `Ratemeters analysis <../_static/notebooks/Ratemeters_tutorial.ipynb>`_: Tutorial for the analysis of the Light Curves produced by the AGILE Scientific Ratemeters. +- `Bayesian Blocks analysis <../_static/notebooks/BayesianBlocks_tutorial.html>`_: run the Bayesian Blocks algorithm on AGILE light curves produced by Maximum Likelihood or Aperture Photometry algorithms, or on unbinnned data. +- `Ratemeters analysis <../_static/notebooks/Ratemeters_tutorial.html>`_: Tutorial for the analysis of the Light Curves produced by the AGILE Scientific Ratemeters. The following notebook is another useful example of the use of Agilepy that is runned downloading AGILE data from SSDC website: