Skip to content

Commit

Permalink
updated tables with results for referee revision
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelio-amerio committed Dec 19, 2023
1 parent c0006b9 commit 56edd7b
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 27 deletions.
44 changes: 22 additions & 22 deletions examples/analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -12,7 +12,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -27,17 +27,17 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"9604\n",
"2719\n",
"1240\n",
"147\n"
"2694\n",
"1211\n",
"149\n"
]
}
],
Expand All @@ -56,7 +56,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -68,7 +68,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -78,7 +78,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -89,7 +89,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 8,
"metadata": {},
"outputs": [
{
Expand All @@ -98,7 +98,7 @@
"'firing_pixels_filtered.fits'"
]
},
"execution_count": 6,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -112,7 +112,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 9,
"metadata": {},
"outputs": [
{
Expand All @@ -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"
]
},
{
Expand All @@ -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",
Expand Down Expand Up @@ -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')]))"
]
},
Expand Down
Binary file modified examples/firing_pixels.fits
Binary file not shown.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "gPCS"
version = "1.0.2"
version = "1.0.3"
authors = [
{ name="Aurelio Amerio", email="[email protected]" },
{ name="Francesca Calore", email=""},
Expand Down
Binary file modified src/gPCS/data/TS_map_4FGL.npz
Binary file not shown.
Binary file modified src/gPCS/data/TS_map_fermi.npz
Binary file not shown.
Binary file modified src/gPCS/data/TS_star_alpha_0.01.npz
Binary file not shown.
Binary file modified src/gPCS/data/TS_star_alpha_0.01_4FGL.npz
Binary file not shown.
Binary file modified src/gPCS/data/TS_star_alpha_0.05.npz
Binary file not shown.
Binary file modified src/gPCS/data/TS_star_alpha_0.05_4FGL.npz
Binary file not shown.
Binary file modified src/gPCS/data/TS_star_alpha_0.1.npz
Binary file not shown.
Binary file modified src/gPCS/data/TS_star_alpha_0.1_4FGL.npz
Binary file not shown.
Binary file modified tests/files/TS_ranking_fermi.npz
Binary file not shown.
Binary file modified tests/files/pixel_firing.npz
Binary file not shown.
8 changes: 4 additions & 4 deletions tests/test_gPCS.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 56edd7b

Please sign in to comment.