Skip to content

Commit

Permalink
modified the image deconvolution notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyoneda committed Jul 2, 2024
1 parent 1d5cb62 commit bfce183
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"source": [
"# DC2 Image Analysis, 511 keV, Image Deconvolution using CDS in the Galactic coordinate system\n",
"\n",
"updated on 2024-06-12 (the commit bdb65a3b5ecde9caef70d9ed1be892be34077b3e)\n",
"updated on 2024-07-02 (the commit 1d5cb62597aab7598a0c92ded2d0c381aaa3fd10)\n",
"\n",
"This notebook focuses on the image deconvolution with the Compton data space (CDS) in the Galactic coordinate system.\n",
"An example of the image analysis will be presented using the 511keV thin disk 3-month simulation data created for DC2.\n",
Expand Down Expand Up @@ -48,7 +48,7 @@
"from cosipy.spacecraftfile import SpacecraftFile\n",
"from cosipy.ts_map.TSMap import TSMap\n",
"from cosipy.data_io import UnBinnedData, BinnedData\n",
"from cosipy.image_deconvolution import SpacecraftAttitudeExposureTable, CoordsysConversionMatrix, DataLoaderDC2, ImageDeconvolution\n",
"from cosipy.image_deconvolution import SpacecraftAttitudeExposureTable, CoordsysConversionMatrix, DataIF_COSI_DC2, ImageDeconvolution\n",
"from cosipy.util import fetch_wasabi_file\n",
"\n",
"# cosipy uses astropy units\n",
Expand Down Expand Up @@ -528,12 +528,12 @@
"source": [
"%%time\n",
"\n",
"dataloader = DataLoaderDC2.load(name = \"511keV\",\n",
" event_binned_data = event.project(['Em', 'Phi', 'PsiChi']),\n",
" dict_bkg_binned_data = {\"albedo\": bkg.project(['Em', 'Phi', 'PsiChi'])},\n",
" rsp = image_response,\n",
" coordsys_conv_matrix=None,\n",
" is_miniDC2_format=False)"
"dataloader = DataIF_COSI_DC2.load(name = \"511keV\",\n",
" event_binned_data = event.project(['Em', 'Phi', 'PsiChi']),\n",
" dict_bkg_binned_data = {\"albedo\": bkg.project(['Em', 'Phi', 'PsiChi'])},\n",
" rsp = image_response,\n",
" coordsys_conv_matrix=None,\n",
" is_miniDC2_format=False)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"source": [
"# DC2 Image Analysis, 511 keV, Image Deconvolution\n",
"\n",
"updated on 2024-06-12 (the commit bdb65a3b5ecde9caef70d9ed1be892be34077b3e)\n",
"updated on 2024-07-02 (the commit 1d5cb62597aab7598a0c92ded2d0c381aaa3fd10)\n",
"\n",
"This notebook focuses on the image deconvolution with the spacecraft attitude (scatt) binning method for DC2.\n",
"Using the 511 keV thin disk 3-month simulation data created for DC2, an example of the image analysis will be presented.\n",
Expand Down Expand Up @@ -47,7 +47,7 @@
"from cosipy.spacecraftfile import SpacecraftFile\n",
"from cosipy.ts_map.TSMap import TSMap\n",
"from cosipy.data_io import UnBinnedData, BinnedData\n",
"from cosipy.image_deconvolution import SpacecraftAttitudeExposureTable, CoordsysConversionMatrix, DataLoaderDC2, ImageDeconvolution\n",
"from cosipy.image_deconvolution import SpacecraftAttitudeExposureTable, CoordsysConversionMatrix, DataIF_COSI_DC2, ImageDeconvolution\n",
"\n",
"# cosipy uses astropy units\n",
"import astropy.units as u\n",
Expand Down Expand Up @@ -372,12 +372,12 @@
"source": [
"%%time\n",
"\n",
"dataloader = DataLoaderDC2.load(name = \"511keV\",\n",
" event_binned_data = data_511keV.binned_data,\n",
" dict_bkg_binned_data = {\"albedo\": data_bkg.binned_data},\n",
" rsp = response,\n",
" coordsys_conv_matrix=ccm,\n",
" is_miniDC2_format=False)"
"dataloader = DataIF_COSI_DC2.load(name = \"511keV\",\n",
" event_binned_data = data_511keV.binned_data,\n",
" dict_bkg_binned_data = {\"albedo\": data_bkg.binned_data},\n",
" rsp = response,\n",
" coordsys_conv_matrix=ccm,\n",
" is_miniDC2_format=False)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"source": [
"# DC2 Image Analysis, 511keV, Upsampling\n",
"\n",
"updated on 2024-06-12 (the commit bdb65a3b5ecde9caef70d9ed1be892be34077b3e)\n",
"updated on 2024-07-02 (the commit 1d5cb62597aab7598a0c92ded2d0c381aaa3fd10)\n",
"\n",
"This notebook explains image reconstruction using the pixel resolution of the model map finer than that of the response matrix.\n",
"\n",
Expand Down Expand Up @@ -373,7 +373,7 @@
"from cosipy.spacecraftfile import SpacecraftFile\n",
"from cosipy.ts_map.TSMap import TSMap\n",
"from cosipy.data_io import UnBinnedData, BinnedData\n",
"from cosipy.image_deconvolution import SpacecraftAttitudeExposureTable, CoordsysConversionMatrix, DataLoaderDC2, ImageDeconvolution\n",
"from cosipy.image_deconvolution import SpacecraftAttitudeExposureTable, CoordsysConversionMatrix, DataIF_COSI_DC2, ImageDeconvolution\n",
"\n",
"# cosipy uses astropy units\n",
"import astropy.units as u\n",
Expand Down Expand Up @@ -1247,12 +1247,12 @@
"source": [
"%%time\n",
"\n",
"dataloader = DataLoaderDC2.load(name = \"511keV\",\n",
" event_binned_data = binned_event,\n",
" dict_bkg_binned_data = {\"albedo\": binned_bkg},\n",
" rsp = full_detector_response,\n",
" coordsys_conv_matrix=coordsys_conv_matrix,\n",
" is_miniDC2_format=False)"
"dataloader = DataIF_COSI_DC2.load(name = \"511keV\",\n",
" event_binned_data = binned_event,\n",
" dict_bkg_binned_data = {\"albedo\": binned_bkg},\n",
" rsp = full_detector_response,\n",
" coordsys_conv_matrix=coordsys_conv_matrix,\n",
" is_miniDC2_format=False)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"source": [
"# DC2 Image Analysis, Crab, Image Deconvolution using CDS in the Galactic coordinate system\n",
"\n",
"updated on 2024-06-12 (the commit bdb65a3b5ecde9caef70d9ed1be892be34077b3e)\n",
"updated on 2024-07-02 (the commit 1d5cb62597aab7598a0c92ded2d0c381aaa3fd10)\n",
"\n",
"This notebook focuses on the image deconvolution with the Compton data space (CDS) in the Galactic coordinate system.\n",
"An example of the image analysis will be presented using the the Crab 3-month simulation data created for DC2.\n",
Expand Down Expand Up @@ -48,7 +48,7 @@
"from cosipy.spacecraftfile import SpacecraftFile\n",
"from cosipy.ts_map.TSMap import TSMap\n",
"from cosipy.data_io import UnBinnedData, BinnedData\n",
"from cosipy.image_deconvolution import SpacecraftAttitudeExposureTable, CoordsysConversionMatrix, DataLoaderDC2, ImageDeconvolution\n",
"from cosipy.image_deconvolution import SpacecraftAttitudeExposureTable, CoordsysConversionMatrix, DataIF_COSI_DC2, ImageDeconvolution\n",
"from cosipy.util import fetch_wasabi_file\n",
"\n",
"# cosipy uses astropy units\n",
Expand Down Expand Up @@ -527,12 +527,12 @@
"source": [
"%%time\n",
"\n",
"dataloader = DataLoaderDC2.load(name = \"Crab\",\n",
" event_binned_data = event.project([\"Em\", \"Phi\", \"PsiChi\"]),\n",
" dict_bkg_binned_data = {\"albedo\": bkg.project([\"Em\", \"Phi\", \"PsiChi\"])},\n",
" rsp = image_response,\n",
" coordsys_conv_matrix=None,\n",
" is_miniDC2_format=False)\n"
"dataloader = DataIF_COSI_DC2.load(name = \"Crab\",\n",
" event_binned_data = event.project([\"Em\", \"Phi\", \"PsiChi\"]),\n",
" dict_bkg_binned_data = {\"albedo\": bkg.project([\"Em\", \"Phi\", \"PsiChi\"])},\n",
" rsp = image_response,\n",
" coordsys_conv_matrix=None,\n",
" is_miniDC2_format=False)\n"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"source": [
"# DC2 Image Analysis, Crab, Image Deconvolution\n",
"\n",
"updated on 2024-06-12 (the commit bdb65a3b5ecde9caef70d9ed1be892be34077b3e)\n",
"updated on 2024-07-02 (the commit 1d5cb62597aab7598a0c92ded2d0c381aaa3fd10)\n",
"\n",
"This notebook focuses on the image deconvolution with the spacecraft attitude (scatt) binning method for DC2.\n",
"Using the Crab 3-month simulation data created for DC2, an example of the image analysis will be presented.\n",
Expand Down Expand Up @@ -47,7 +47,7 @@
"from cosipy.spacecraftfile import SpacecraftFile\n",
"from cosipy.ts_map.TSMap import TSMap\n",
"from cosipy.data_io import UnBinnedData, BinnedData\n",
"from cosipy.image_deconvolution import SpacecraftAttitudeExposureTable, CoordsysConversionMatrix, DataLoaderDC2, ImageDeconvolution\n",
"from cosipy.image_deconvolution import SpacecraftAttitudeExposureTable, CoordsysConversionMatrix, DataIF_COSI_DC2, ImageDeconvolution\n",
"\n",
"# cosipy uses astropy units\n",
"import astropy.units as u\n",
Expand Down Expand Up @@ -385,12 +385,12 @@
"source": [
"%%time\n",
"\n",
"dataloader = DataLoaderDC2.load(name = \"Crab\",\n",
" event_binned_data = Crab_data.binned_data, \n",
" dict_bkg_binned_data = {\"albedo\": bkg_data.binned_data},\n",
" rsp = response,\n",
" coordsys_conv_matrix=ccm,\n",
" is_miniDC2_format=False)"
"dataloader = DataIF_COSI_DC2.load(name = \"Crab\",\n",
" event_binned_data = Crab_data.binned_data, \n",
" dict_bkg_binned_data = {\"albedo\": bkg_data.binned_data},\n",
" rsp = response,\n",
" coordsys_conv_matrix=ccm,\n",
" is_miniDC2_format=False)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"source": [
"# GRB image analysis (miniDC2)\n",
"\n",
"updated on 2024-06-12 (the commit bdb65a3b5ecde9caef70d9ed1be892be34077b3e)\n",
"updated on 2024-07-02 (the commit 1d5cb62597aab7598a0c92ded2d0c381aaa3fd10)\n",
"\n",
"Using the GRB simulation data created for miniDC2, an example of the image analysis will be presented.\n",
"\n",
Expand Down Expand Up @@ -48,7 +48,7 @@
"from cosipy.response import FullDetectorResponse\n",
"from cosipy.spacecraftfile import SpacecraftFile\n",
"from cosipy import BinnedData, Band_Eflux\n",
"from cosipy.image_deconvolution import DataLoaderDC2, ImageDeconvolution, CoordsysConversionMatrix\n",
"from cosipy.image_deconvolution import DataIF_COSI_DC2, ImageDeconvolution, CoordsysConversionMatrix\n",
"from cosipy.util import fetch_wasabi_file\n",
"\n",
"from histpy import Histogram, HealpixAxis, Axis\n",
Expand Down Expand Up @@ -822,12 +822,12 @@
"source": [
"%%time\n",
"\n",
"dataloader = DataLoaderDC2.load(name = \"GRB\",\n",
" event_binned_data = grb_data.binned_data, \n",
" dict_bkg_binned_data = {\"bkg_model\": bkg_data.binned_data}, \n",
" rsp = response, \n",
" coordsys_conv_matrix = coordsys_conv_matrix,\n",
" is_miniDC2_format = True)"
"dataloader = DataIF_COSI_DC2.load(name = \"GRB\",\n",
" event_binned_data = grb_data.binned_data, \n",
" dict_bkg_binned_data = {\"bkg_model\": bkg_data.binned_data}, \n",
" rsp = response, \n",
" coordsys_conv_matrix = coordsys_conv_matrix,\n",
" is_miniDC2_format = True)"
]
},
{
Expand Down

0 comments on commit bfce183

Please sign in to comment.