diff --git a/examples/analysis.ipynb b/examples/analysis.ipynb index 900ce1d..6bb0ce6 100644 --- a/examples/analysis.ipynb +++ b/examples/analysis.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -12,7 +12,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -27,7 +27,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -35,9 +35,9 @@ "output_type": "stream", "text": [ "9604\n", - "2719\n", - "1240\n", - "147\n" + "2694\n", + "1211\n", + "149\n" ] } ], @@ -56,7 +56,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -68,7 +68,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -78,7 +78,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -89,7 +89,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -98,7 +98,7 @@ "'firing_pixels_filtered.fits'" ] }, - "execution_count": 6, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -112,7 +112,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -122,9 +122,9 @@ "Filename: firing_pixels.fits\n", "No. Name Ver Type Cards Dimensions Format\n", " 0 PRIMARY 1 PrimaryHDU 4 () \n", - " 1 ALPHA=0.01 1 BinTableHDU 19 9957R x 5C [K, E, E, E, E] \n", - " 2 ALPHA=0.05 1 BinTableHDU 19 9500R x 5C [K, E, E, E, E] \n", - " 3 ALPHA=0.1 1 BinTableHDU 19 8681R x 5C [K, E, E, E, E] \n" + " 1 ALPHA=0.01 1 BinTableHDU 19 10068R x 5C [K, E, E, E, E] \n", + " 2 ALPHA=0.05 1 BinTableHDU 19 9636R x 5C [K, E, E, E, E] \n", + " 3 ALPHA=0.1 1 BinTableHDU 19 9409R x 5C [K, E, E, E, E] \n" ] }, { @@ -143,7 +143,7 @@ "BITPIX = 8 / array data type \n", "NAXIS = 2 / number of array dimensions \n", "NAXIS1 = 24 / length of dimension 1 \n", - "NAXIS2 = 9957 / length of dimension 2 \n", + "NAXIS2 = 10068 / length of dimension 2 \n", "PCOUNT = 0 / number of group parameters \n", "GCOUNT = 1 / number of groups \n", "TFIELDS = 5 / number of table fields \n", @@ -173,13 +173,13 @@ { "data": { "text/plain": [ - "FITS_rec([( 146881, 6.8197925e+05, 1. , 1. , 1. ),\n", - " (2545130, 6.4414856e+05, 1. , 1. , 1. ),\n", - " (2543081, 3.3422578e+05, 1. , 1. , 1. ),\n", + "FITS_rec([( 146881, 6.819703e+05, 1. , 1. , 1. ),\n", + " (2545130, 6.438488e+05, 1. , 1. , 1. ),\n", + " (2543081, 3.341038e+05, 1. , 1. , 1. ),\n", " ...,\n", - " (2907254, 3.3943626e+01, 0.50394815, 0.49927253, 0.5106475 ),\n", - " (2427848, 3.3915901e+01, 0.50070864, 0.49590784, 0.5073455 ),\n", - " ( 387044, 3.3909271e+01, 0.50050616, 0.4957333 , 0.50716674)],\n", + " ( 690723, 3.331866e+01, 0.5034965 , 0.49776882, 0.5099845 ),\n", + " ( 558036, 3.331725e+01, 0.50312847, 0.49743295, 0.5096404 ),\n", + " ( 460713, 3.331335e+01, 0.50257635, 0.49686065, 0.50907266)],\n", " dtype=(numpy.record, [('pixel', '>i8'), ('TS', '>f4'), ('QF_best', '>f4'), ('QF_min', '>f4'), ('QF_max', '>f4')]))" ] }, diff --git a/examples/firing_pixels.fits b/examples/firing_pixels.fits index c80737f..3d64b81 100644 Binary files a/examples/firing_pixels.fits and b/examples/firing_pixels.fits differ diff --git a/pyproject.toml b/pyproject.toml index 1e215ed..48aa6d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "gPCS" -version = "1.0.2" +version = "1.0.3" authors = [ { name="Aurelio Amerio", email="aurelio.amerio@ific.uv.es" }, { name="Francesca Calore", email=""}, diff --git a/src/gPCS/data/TS_map_4FGL.npz b/src/gPCS/data/TS_map_4FGL.npz index 46ff305..0641958 100644 Binary files a/src/gPCS/data/TS_map_4FGL.npz and b/src/gPCS/data/TS_map_4FGL.npz differ diff --git a/src/gPCS/data/TS_map_fermi.npz b/src/gPCS/data/TS_map_fermi.npz index 14f1814..e4a3a31 100644 Binary files a/src/gPCS/data/TS_map_fermi.npz and b/src/gPCS/data/TS_map_fermi.npz differ diff --git a/src/gPCS/data/TS_star_alpha_0.01.npz b/src/gPCS/data/TS_star_alpha_0.01.npz index 8edb884..ded3814 100644 Binary files a/src/gPCS/data/TS_star_alpha_0.01.npz and b/src/gPCS/data/TS_star_alpha_0.01.npz differ diff --git a/src/gPCS/data/TS_star_alpha_0.01_4FGL.npz b/src/gPCS/data/TS_star_alpha_0.01_4FGL.npz index 088cddb..ded3814 100644 Binary files a/src/gPCS/data/TS_star_alpha_0.01_4FGL.npz and b/src/gPCS/data/TS_star_alpha_0.01_4FGL.npz differ diff --git a/src/gPCS/data/TS_star_alpha_0.05.npz b/src/gPCS/data/TS_star_alpha_0.05.npz index f22b39d..ac5641b 100644 Binary files a/src/gPCS/data/TS_star_alpha_0.05.npz and b/src/gPCS/data/TS_star_alpha_0.05.npz differ diff --git a/src/gPCS/data/TS_star_alpha_0.05_4FGL.npz b/src/gPCS/data/TS_star_alpha_0.05_4FGL.npz index 0e8fedd..ac5641b 100644 Binary files a/src/gPCS/data/TS_star_alpha_0.05_4FGL.npz and b/src/gPCS/data/TS_star_alpha_0.05_4FGL.npz differ diff --git a/src/gPCS/data/TS_star_alpha_0.1.npz b/src/gPCS/data/TS_star_alpha_0.1.npz index c4c6ec4..4ae5d32 100644 Binary files a/src/gPCS/data/TS_star_alpha_0.1.npz and b/src/gPCS/data/TS_star_alpha_0.1.npz differ diff --git a/src/gPCS/data/TS_star_alpha_0.1_4FGL.npz b/src/gPCS/data/TS_star_alpha_0.1_4FGL.npz index 3a06a40..4ae5d32 100644 Binary files a/src/gPCS/data/TS_star_alpha_0.1_4FGL.npz and b/src/gPCS/data/TS_star_alpha_0.1_4FGL.npz differ diff --git a/tests/files/TS_ranking_fermi.npz b/tests/files/TS_ranking_fermi.npz index ac1bb95..bb276fd 100644 Binary files a/tests/files/TS_ranking_fermi.npz and b/tests/files/TS_ranking_fermi.npz differ diff --git a/tests/files/pixel_firing.npz b/tests/files/pixel_firing.npz index 08e61f0..d13d368 100644 Binary files a/tests/files/pixel_firing.npz and b/tests/files/pixel_firing.npz differ diff --git a/tests/test_gPCS.py b/tests/test_gPCS.py index 383c81f..00c8a69 100644 --- a/tests/test_gPCS.py +++ b/tests/test_gPCS.py @@ -23,20 +23,20 @@ def test_get_CDF(): return def test_get_QF_from_TS(): - QF_ref = 0.47013565499088883 + QF_ref = 0.527972027972028 #0.47013565499088883 QF = gPCS.get_QF_from_TS(36, alpha=0.05) assert np.allclose(QF, QF_ref) return def test_get_QF_ranges_from_TS(): - m_ref = 0.47 - s_ref = 0.0086 + m_ref = 0.52 #0.47 + s_ref = 0.0086 #0.0086 m, s = gPCS.get_QF_ranges_from_TS(36, alpha=0.05, batches=1_000, batch_size=2000) assert np.allclose(m, m_ref, rtol=1e-1) and np.allclose(s, s_ref, rtol=1e-1) return def test_get_TS_from_QF(): - TS_ref = 36.56653911691979 + TS_ref = 35.791377316749134 #36.56653911691979 TS = gPCS.get_TS_from_QF(0.5, alpha=0.05) assert np.allclose(TS, TS_ref) return