Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
19a4fa6
Gen2 geometry files and sim_test script
jakob2508 Apr 26, 2023
849bc31
Merge remote-tracking branch 'origin/main' into gen2-sensitivity
jakob2508 Apr 26, 2023
bebff39
fixed init_model import in source.py
jakob2508 Apr 27, 2023
c6143bf
new geo files, changes in simulation.py and detector.py to load geome…
jakob2508 Apr 27, 2023
a4df707
fixed detector.py for Gen2, work in progress on doms_table data type …
jakob2508 Apr 28, 2023
ff6bd3b
Fixed table merge in detector.py, included mDOM properties, implement…
jakob2508 Apr 28, 2023
a2c93be
fixed interpolation of effvol in detector.py for Gen2, Gen2 support f…
jakob2508 May 1, 2023
e969eae
analysis script for amplitude variation, tamborra model test script, …
jakob2508 May 9, 2023
381bf2b
progress in amplitude_analysis.py, contains scan over distances now
jakob2508 May 9, 2023
4944033
new mDOM geometry files, cross checks, directory clean up
jakob2508 May 11, 2023
0b09808
finalized amplitude and frequency analysis
jakob2508 May 16, 2023
ffca14d
added template analysis and cross correlation tester
jakob2508 May 23, 2023
2153e97
new method to compute significance for all analyses
jakob2508 Jun 15, 2023
623a6ee
changed self.doms_table from property to function self.get_doms_table…
jakob2508 Jul 27, 2023
1b1dd96
fixed bug with too high noise for modules, included different dead ti…
jakob2508 Jul 27, 2023
1164cb6
cleaned up docs/my_project/analysis directory and fixed some bugs
jakob2508 Jul 28, 2023
4c647d5
updated analysis
jakob2508 Jan 10, 2024
0f5126f
copy of gen2-sensitivity branch without docs/my_project repo
jakob2508 Jan 10, 2024
4548055
cleaned up data/detector and python/asteria/tests
jakob2508 Jan 10, 2024
39b03f3
removed instances of multiplicity which will be introduced at later time
jakob2508 Jan 10, 2024
c0a9220
new example config file with DETECTOR class
jakob2508 Jan 11, 2024
cea9f12
updated config file loading
jakob2508 Jan 11, 2024
e093da7
add notebook that went missing
jakob2508 Jan 15, 2024
b665c97
added missing script for Gen2
jakob2508 Feb 2, 2024
4fdcc36
manually added changes to simulation.py from upstream version
jakob2508 Apr 5, 2024
8ec59e7
tested Gen2 example script
jakob2508 Apr 5, 2024
c03c5cf
changed wls implementation for Gen2
jakob2508 Apr 8, 2024
716face
changed variable names in DETECTOR in accordance with changes in simu…
jakob2508 Apr 8, 2024
2d35c4a
adapted script according to changes in simulation.py and detector.py
jakob2508 Apr 8, 2024
6715323
cleaned up code
jakob2508 Apr 8, 2024
16e3472
Revert nb changes to clear merge conflicts.
Jun 22, 2025
c49ed35
Temp. revert change; fix merge conflict with main.
Jun 22, 2025
31a8013
Try again with reversion to fix merge conflict.
Jun 22, 2025
eaabfe9
Fix merge conflict with main.
Jun 22, 2025
2a7eeae
Temporary revert to fix merge conflict with main.
Jun 22, 2025
bec1922
Resolved rename conflict during merge
Jun 22, 2025
9913537
Add missing detector_scope option.
Jun 22, 2025
e52eedf
Fixes related to recent interactions updates.
Jun 22, 2025
075b27c
Add missing import.
Jun 22, 2025
41666b5
Remove paths to $ASTERIA.
Jun 22, 2025
4d62101
Add eCSV formatted detector geometry files.
Jun 22, 2025
da57fb3
Install detector eCSV files.
Jun 22, 2025
ed98ff7
Use eCSV detector files by default.
Jun 22, 2025
ece38d4
Simplify eff vol filename for IC86 DOMs.
Jun 22, 2025
42c4a12
Simplify DOM table creation.
Jun 22, 2025
dfffb9a
Update simulation metadata.
Jun 22, 2025
34ac2aa
Average DOM signal shifted by about 1%.
Jun 22, 2025
07b2906
Clean up DOM table creation.
Jun 22, 2025
7bdb7ed
Correct checks for null arrays.
Jun 22, 2025
c84d105
Be careful about checking for null paramters.
Jun 22, 2025
6ac9c97
Add table names to metadata.
Jun 22, 2025
315b525
Add eCSV versions of the effective volume files.
Jun 22, 2025
baef377
Remove txt versions of effective volume files.
Jun 22, 2025
18988e8
Remove obsolete initializing function.
Jun 22, 2025
3133511
Merge remote-tracking branch 'origin/main' into gen-sim
Jun 24, 2025
f6a1d8f
Merge remote-tracking branch 'origin/main' into gen-sim
Jun 28, 2025
0a1ae7f
Add updated detector hits notebook.
Jun 28, 2025
7f1baff
Set geometry file given the detector scope.
Jun 28, 2025
4359649
Add Gen2 response test notebook.
Jun 28, 2025
e57087f
Remove obsolete notebook.
Jun 28, 2025
8c09e3a
Remove obsolete ASTERIA env variable.
Jun 28, 2025
4daf414
Delete obsolete/unused notebooks.
Jun 28, 2025
5fff249
Add a Gen2 configuration file example.
Jun 28, 2025
c4f43cd
Set boolean from config file.
Jun 28, 2025
32a1ad8
Add initialization tests for Gen2 sim.
Jun 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ jobs:
- name: Install ASTERIA
run: |
pip install ".[dev]"
- name: Set ASTERIA environment
run: |
echo "ASTERIA=${{ github.workspace }}" >> "$GITHUB_ENV"
- name: Run tests with coverage
run: |
pytest --cov
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,6 @@ jobs:
- name: Install ASTERIA
run: |
pip install ".[dev]"
- name: Set ASTERIA environment
run: |
echo "ASTERIA=${{ github.workspace }}" >> "$GITHUB_ENV"
if: runner.os != 'Windows'
- name: Set ASTERIA environment for Windows
run: |
echo "ASTERIA=${{ github.workspace }}" | Out-File -FilePath $env:GITHUB_ENV -Append
if: runner.os == 'Windows'
- name: Run unit tests with pytest
run: |
pytest
146 changes: 0 additions & 146 deletions docs/scratch/sim_tester.ipynb

This file was deleted.

361 changes: 0 additions & 361 deletions docs/source/nb/detector_hits.ipynb

This file was deleted.

356 changes: 356 additions & 0 deletions docs/source/nb/detector_hits_Gen2.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,356 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "115a4e1c-1ab6-40f9-ba0d-1be45e0bbd4d",
"metadata": {},
"source": [
"# Detector Hits in IceCube-Gen2\n",
"\n",
"Demonstrate detector hits in the IC86 + Gen2 configuration of IceCube.\n",
"\n",
"This includes both mDOMs and WLS modules."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e2eb397f-92c2-40d2-932f-5816b85cf46b",
"metadata": {},
"outputs": [],
"source": [
"from astropy import units as u\n",
"\n",
"import numpy as np\n",
"import matplotlib as mpl\n",
"import matplotlib.pyplot as plt\n",
"\n",
"from snewpy.neutrino import Flavor\n",
"\n",
"from asteria.simulation import Simulation\n",
"from asteria import set_rcparams\n",
"from asteria import interactions\n",
"\n",
"from importlib.resources import files\n",
"\n",
"set_rcparams(verbose=False)"
]
},
{
"cell_type": "markdown",
"id": "7af47266-c61c-45a7-b572-b865a1092864",
"metadata": {},
"source": [
"## Configure an mDOM Gen2 Simulation\n",
"\n",
"Set up a progenitor 10 kpc from Earth and generate simulated hits.\n",
"\n",
"To simulate the Gen2 detector, add the argument `detector_scope='Gen2'` when initializing the simulation."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1dff7931-b55f-4563-ab3b-12cf5e78e2bb",
"metadata": {},
"outputs": [],
"source": [
"model = {'name': 'Nakazato_2013',\n",
" 'param':{\n",
" 'progenitor_mass': 13 * u.Msun,\n",
" 'revival_time': 300 * u.ms,\n",
" 'metallicity': 0.004,\n",
" 'eos': 'shen'}\n",
" }\n",
"\n",
"sim = Simulation(model=model,\n",
" distance=10 * u.kpc, \n",
" Emin=0*u.MeV, Emax=100*u.MeV, dE=1*u.MeV,\n",
" tmin=-1*u.s, tmax=1*u.s, dt=1*u.ms,\n",
" detector_scope='Gen2')\n",
"sim.run()"
]
},
{
"cell_type": "markdown",
"id": "3052237c-8160-44b7-ac0e-bb2c4e986ee2",
"metadata": {},
"source": [
"## Plot the Energy Deposit"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8252ebd0-52b8-4504-915e-3f36189f5419",
"metadata": {},
"outputs": [],
"source": [
"fig, ax = plt.subplots(1,1, figsize=(8,6), tight_layout=True)\n",
"\n",
"for flavor in sim.flavors:\n",
" ax.plot(sim.time, sim.E_per_V[flavor], label=flavor.to_tex())\n",
"ax.legend()\n",
"ax.set(xlabel=r'$t-t_\\mathrm{bounce}$ [s]',\n",
" ylabel='energy deposit [Mev m$^{-3}$])',\n",
" xlim=(-0.15, 0.75));"
]
},
{
"cell_type": "markdown",
"id": "fe116039-a071-467a-8bd6-06aa2a812468",
"metadata": {},
"source": [
"## Plot Detector Response\n",
"\n",
"### Expected Signal from Each Subdetector\n",
"\n",
"Set a time resolution `dt`. Using the `sim.detector_signal()` function we can read out the detector signal for each subdetector class. Separately plot hits from the main IceCube strings and DeepCore."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d90d09cf-5ecc-475c-bbc5-178c95e4e2c2",
"metadata": {},
"outputs": [],
"source": [
"dt = 2 * u.ms\n",
"t, sim_i3 = sim.detector_signal(subdetector='i3', dt=dt)\n",
"t, sim_dc = sim.detector_signal(subdetector='dc', dt=dt)\n",
"t, sim_md = sim.detector_signal(subdetector='md', dt=dt)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "52d3c595-17e0-4df0-9746-af9d47e77a35",
"metadata": {},
"outputs": [],
"source": [
"fig, ax = plt.subplots(1,1, figsize=(8,6), tight_layout=True)\n",
"ax.plot(t, sim_i3, label='IceCube DOM')\n",
"ax.plot(t, sim_dc, label='HQE DOM (DeepCore)')\n",
"ax.plot(t, sim_md, label='mDOM (Gen2)')\n",
"ax.legend(fontsize=14)\n",
"ax.set(xlabel=r'$t-t_\\mathrm{bounce}$ [s]',\n",
" ylabel=f'detector hits',\n",
" xlim=(-0.15, 0.75),\n",
" ylim=(0,10000));"
]
},
{
"cell_type": "markdown",
"id": "5854b46f-9889-48fd-bdef-d69678b5c147",
"metadata": {},
"source": [
"### Generated Hits from Signal Only"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c29ae3a0-b978-4ada-8580-a0a167d89dba",
"metadata": {},
"outputs": [],
"source": [
"t, hits_i3 = sim.detector_hits(subdetector='i3', dt=dt)\n",
"t, hits_dc = sim.detector_hits(subdetector='dc', dt=dt)\n",
"t, hits_md = sim.detector_signal(subdetector='md', dt=dt)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fb6a1409-3da3-4071-ab48-e9a8d5bfdfef",
"metadata": {},
"outputs": [],
"source": [
"fig, ax = plt.subplots(1,1, figsize=(8,6), tight_layout=True)\n",
"ax.plot(t, hits_i3, label='IceCube DOM')\n",
"ax.plot(t, hits_dc, label='HQE DOM (DeepCore)')\n",
"ax.plot(t, hits_md, label='mDOM (Gen2)')\n",
"\n",
"ax.legend(fontsize=14)\n",
"ax.set(xlabel=r'$t-t_\\mathrm{bounce}$ [s]',\n",
" ylabel=f'detector hits',\n",
" xlim=(-0.15, 0.75),\n",
" ylim=(0,10000));"
]
},
{
"cell_type": "markdown",
"id": "0f3f7030-fb90-4a89-b98f-d0d0e9787446",
"metadata": {},
"source": [
"### Generated Hits from Signal + Background\n",
"\n",
"Separately compute the background hits and signal from each subdetector and add them."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a2f39f58-504e-42ca-8f0f-8a72f7dd8eb2",
"metadata": {},
"outputs": [],
"source": [
"bkg_i3 = sim.detector.i3_bg(dt, size=hits_i3.size)\n",
"bkg_dc = sim.detector.dc_bg(dt, size=hits_dc.size)\n",
"bkg_md = sim.detector.md_bg(dt, size=hits_md.size)\n",
"\n",
"bkg = bkg_i3 + bkg_dc + bkg_md\n",
"hits = hits_i3 + hits_dc + hits_md"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f4df03ef-e5f6-40a4-a2cd-1f0c94c51d46",
"metadata": {},
"outputs": [],
"source": [
"fig, ax = plt.subplots(1,1, figsize=(8,6), tight_layout=True)\n",
"ax.plot(t, hits_i3 + bkg_i3, label='IceCube DOM')\n",
"ax.plot(t, hits_dc + bkg_dc, label='HQE DOM (DeepCore)')\n",
"ax.plot(t, hits_md + bkg_md, label='mDOM (Gen2)')\n",
"ax.plot(t, hits + bkg, label='Total hits')\n",
"\n",
"ax.legend(loc='center right', fontsize=14)\n",
"ax.set(xlabel=r'$t-t_\\mathrm{bounce}$ [s]',\n",
" ylabel=f'detector hits',\n",
" xlim=(-0.15, 0.75),\n",
" ylim=(0,65000)\n",
");"
]
},
{
"cell_type": "markdown",
"id": "e03521b3-ec42-4bd9-87ce-d289bd8a1591",
"metadata": {},
"source": [
"## Add WLS Modules\n",
"\n",
"In the Gen2 detector scope, using the `add_wls=True` argument will add wavelength-shifting modules to the Gen2 detector response.\n",
"\n",
"The hits can be accessed as the `ws` subdetector."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7cebd2b2-7533-4d1f-a074-d5299a2f00df",
"metadata": {},
"outputs": [],
"source": [
"sim_ws = Simulation(model=model,\n",
" distance=10 * u.kpc, \n",
" Emin=0*u.MeV, Emax=100*u.MeV, dE=1*u.MeV,\n",
" tmin=-1*u.s, tmax=1*u.s, dt=1*u.ms,\n",
" detector_scope='Gen2',\n",
" add_wls=True)\n",
"sim_ws.run()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2c8de85b-f01a-41f1-99cd-7cd79a296ad0",
"metadata": {},
"outputs": [],
"source": [
"t, hits_i3 = sim_ws.detector_hits(subdetector='i3', dt=dt)\n",
"t, hits_dc = sim_ws.detector_hits(subdetector='dc', dt=dt)\n",
"t, hits_md = sim_ws.detector_signal(subdetector='md', dt=dt)\n",
"t, hits_ws = sim_ws.detector_signal(subdetector='ws', dt=dt)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "00ac3f74-787d-4098-bd3b-24f2d394eb39",
"metadata": {},
"outputs": [],
"source": [
"fig, ax = plt.subplots(1,1, figsize=(8,6), tight_layout=True)\n",
"ax.plot(t, hits_i3, label='IceCube DOM')\n",
"ax.plot(t, hits_dc, label='HQE DOM (DeepCore)')\n",
"ax.plot(t, hits_md, label='mDOM (Gen2)')\n",
"ax.plot(t, hits_ws, label='mDOM+WLS (Gen2)')\n",
"\n",
"ax.legend(fontsize=14)\n",
"ax.set(xlabel=r'$t-t_\\mathrm{bounce}$ [s]',\n",
" ylabel=f'detector hits',\n",
" xlim=(-0.15, 0.75),\n",
" ylim=(0,10000));"
]
},
{
"cell_type": "markdown",
"id": "286dd290-371f-4672-92d5-0a54eb7fb77b",
"metadata": {},
"source": [
"### Plot the Sum of Signal + Background"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1c2d27df-8173-45c6-84ad-5c63214a681c",
"metadata": {},
"outputs": [],
"source": [
"bkg_i3 = sim.detector.i3_bg(dt, size=hits_i3.size)\n",
"bkg_dc = sim.detector.dc_bg(dt, size=hits_dc.size)\n",
"bkg_md = sim.detector.md_bg(dt, size=hits_md.size)\n",
"bkg_ws = sim.detector.ws_bg(dt, size=hits_ws.size)\n",
"\n",
"bkg = bkg_i3 + bkg_dc + bkg_md + bkg_ws\n",
"hits = hits_i3 + hits_dc + hits_md + hits_ws"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8a6fe116-4718-46b8-8991-a2d6cb0db220",
"metadata": {},
"outputs": [],
"source": [
"fig, ax = plt.subplots(1,1, figsize=(8,6), tight_layout=True)\n",
"ax.plot(t, hits_i3 + bkg_i3, label='IceCube DOM')\n",
"ax.plot(t, hits_dc + bkg_dc, label='HQE DOM (DeepCore)')\n",
"ax.plot(t, hits_md + bkg_md, label='mDOM (Gen2)')\n",
"ax.plot(t, hits_ws + bkg_ws, label='mDOM+WLS (Gen2)')\n",
"ax.plot(t, hits + bkg, label='Total hits')\n",
"\n",
"ax.legend(loc='center', ncol=2, fontsize=14)\n",
"ax.set(xlabel=r'$t-t_\\mathrm{bounce}$ [s]',\n",
" ylabel=f'detector hits',\n",
" xlim=(-0.15, 0.75),\n",
" ylim=(0,75000)\n",
");"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.11"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading