isgri 0.7.0__tar.gz → 0.7.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. {isgri-0.7.0 → isgri-0.7.2}/PKG-INFO +57 -1
  2. {isgri-0.7.0 → isgri-0.7.2}/README.md +56 -0
  3. {isgri-0.7.0 → isgri-0.7.2}/demo/lightcurve_walkthrough.ipynb +424 -420
  4. {isgri-0.7.0 → isgri-0.7.2}/pyproject.toml +1 -1
  5. isgri-0.7.2/src/isgri/__version__.py +1 -0
  6. {isgri-0.7.0 → isgri-0.7.2}/src/isgri/catalog/builder.py +13 -1
  7. isgri-0.7.2/src/isgri/cli/builder.py +102 -0
  8. {isgri-0.7.0 → isgri-0.7.2}/src/isgri/cli/main.py +27 -5
  9. {isgri-0.7.0 → isgri-0.7.2}/src/isgri/cli/query.py +54 -7
  10. isgri-0.7.0/src/isgri/__version__.py +0 -1
  11. {isgri-0.7.0 → isgri-0.7.2}/.gitignore +0 -0
  12. {isgri-0.7.0 → isgri-0.7.2}/.python-version +0 -0
  13. {isgri-0.7.0 → isgri-0.7.2}/LICENSE +0 -0
  14. {isgri-0.7.0/demo/data → isgri-0.7.2/demo/data/PIFs/SGR1935/2559}/255900280010_isgri_model.fits.gz +0 -0
  15. {isgri-0.7.0/demo/data → isgri-0.7.2/demo/data/archive/2559/255900280010.001}/isgri_events.fits.gz +0 -0
  16. {isgri-0.7.0 → isgri-0.7.2}/demo/scwquery_walkthrough.ipynb +0 -0
  17. {isgri-0.7.0 → isgri-0.7.2}/src/isgri/__init__.py +0 -0
  18. {isgri-0.7.0 → isgri-0.7.2}/src/isgri/catalog/__init__.py +0 -0
  19. {isgri-0.7.0 → isgri-0.7.2}/src/isgri/catalog/scwquery.py +0 -0
  20. {isgri-0.7.0 → isgri-0.7.2}/src/isgri/catalog/wcs.py +0 -0
  21. {isgri-0.7.0 → isgri-0.7.2}/src/isgri/cli/__init__.py +0 -0
  22. {isgri-0.7.0 → isgri-0.7.2}/src/isgri/config.py +0 -0
  23. {isgri-0.7.0 → isgri-0.7.2}/src/isgri/utils/__init__.py +0 -0
  24. {isgri-0.7.0 → isgri-0.7.2}/src/isgri/utils/file_loaders.py +0 -0
  25. {isgri-0.7.0 → isgri-0.7.2}/src/isgri/utils/lightcurve.py +0 -0
  26. {isgri-0.7.0 → isgri-0.7.2}/src/isgri/utils/pif.py +0 -0
  27. {isgri-0.7.0 → isgri-0.7.2}/src/isgri/utils/quality.py +0 -0
  28. {isgri-0.7.0 → isgri-0.7.2}/src/isgri/utils/time_conversion.py +0 -0
  29. {isgri-0.7.0 → isgri-0.7.2}/tests/__init__.py +0 -0
  30. {isgri-0.7.0 → isgri-0.7.2}/tests/catalog/test_builder.py +0 -0
  31. {isgri-0.7.0 → isgri-0.7.2}/tests/catalog/test_scwquery.py +0 -0
  32. {isgri-0.7.0 → isgri-0.7.2}/tests/catalog/test_wcs.py +0 -0
  33. {isgri-0.7.0 → isgri-0.7.2}/tests/cli/test_main.py +0 -0
  34. {isgri-0.7.0 → isgri-0.7.2}/tests/test_config.py +0 -0
  35. {isgri-0.7.0 → isgri-0.7.2}/tests/utils/__init__.py +0 -0
  36. {isgri-0.7.0 → isgri-0.7.2}/tests/utils/test_file_loaders.py +0 -0
  37. {isgri-0.7.0 → isgri-0.7.2}/tests/utils/test_lightcurve.py +0 -0
  38. {isgri-0.7.0 → isgri-0.7.2}/tests/utils/test_pif.py +0 -0
  39. {isgri-0.7.0 → isgri-0.7.2}/tests/utils/test_quality.py +0 -0
  40. {isgri-0.7.0 → isgri-0.7.2}/tests/utils/test_time_conversion.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: isgri
3
- Version: 0.7.0
3
+ Version: 0.7.2
4
4
  Summary: Python package for INTEGRAL IBIS/ISGRI lightcurve analysis
5
5
  Author: Dominik Patryk Pacholski
6
6
  License: MIT
@@ -26,6 +26,7 @@ Query catalogs directly from the terminal:
26
26
  - Interactive and direct query modes
27
27
  - Filter by time, position, quality, revolution
28
28
  - Export results to FITS/CSV or SWID lists
29
+ - Update catalogs with new science windows from archive
29
30
 
30
31
  ### SCW Catalog Query
31
32
  Query INTEGRAL Science Window catalogs with a fluent Python API:
@@ -33,6 +34,13 @@ Query INTEGRAL Science Window catalogs with a fluent Python API:
33
34
  - Calculate detector offsets
34
35
  - Export results to any auto detectable astropy table extension or in table aligned data for any other extension
35
36
 
37
+ ### Catalog Builder
38
+ Build and update INTEGRAL/ISGRI science window catalogs:
39
+ - Automatic discovery of new science windows in archive
40
+ - Parallel processing of quality metrics
41
+ - Optional light curve caching
42
+ - Incremental catalog updates
43
+
36
44
  ### Light Curve Analysis
37
45
  Extract and analyze ISGRI light curves:
38
46
  - Load from file paths or SWID/source lookup
@@ -60,6 +68,9 @@ isgri config-set --archive /path/to/archive --catalog ~/data/scw_catalog.fits --
60
68
  # View current config
61
69
  isgri config
62
70
 
71
+ # Update catalog from archive
72
+ isgri update
73
+
63
74
  # Interactive catalog query
64
75
  isgri query
65
76
  # query> time
@@ -109,6 +120,51 @@ swids = cat.get_swids()
109
120
  print(f"Found {len(results)} observations")
110
121
  ```
111
122
 
123
+ ### Build/Update SCW Catalog
124
+
125
+ #### Command Line
126
+
127
+ ```bash
128
+ # Update catalog using configured paths
129
+ isgri update
130
+
131
+ # Update with custom paths
132
+ isgri update --archive /anita/archivio/ --catalog ~/data/catalog.fits
133
+
134
+ # Enable light curve caching (15-1000 keV, 1s bins)
135
+ isgri update --cache ~/data/lightcurves/
136
+
137
+ # Limit CPU cores for parallel processing
138
+ isgri update --cores 4
139
+ ```
140
+
141
+ #### Python API
142
+
143
+ ```python
144
+ from isgri.catalog import CatalogBuilder
145
+
146
+ # Create builder instance
147
+ builder = CatalogBuilder(
148
+ archive_path="/path/to/archive",
149
+ catalog_path="scw_catalog.fits",
150
+ lightcurve_cache="/path/to/cache", # optional
151
+ n_cores=8
152
+ )
153
+
154
+ # Update catalog with new science windows
155
+ builder.update_catalog()
156
+
157
+ # Find all science windows in archive
158
+ swids, paths = builder.find_scws()
159
+ print(f"Found {len(swids)} science windows")
160
+ ```
161
+
162
+ The builder:
163
+ - Scans archive for new ScWs not in catalog
164
+ - Computes quality metrics (raw, sigma-clipped, GTI-filtered chi-squared)
165
+ - Processes in parallel by revolution
166
+ - Optionally caches 1s light curves (15-1000 keV)
167
+
112
168
  ### Analyze Light Curves
113
169
 
114
170
  ```python
@@ -9,6 +9,7 @@ Query catalogs directly from the terminal:
9
9
  - Interactive and direct query modes
10
10
  - Filter by time, position, quality, revolution
11
11
  - Export results to FITS/CSV or SWID lists
12
+ - Update catalogs with new science windows from archive
12
13
 
13
14
  ### SCW Catalog Query
14
15
  Query INTEGRAL Science Window catalogs with a fluent Python API:
@@ -16,6 +17,13 @@ Query INTEGRAL Science Window catalogs with a fluent Python API:
16
17
  - Calculate detector offsets
17
18
  - Export results to any auto detectable astropy table extension or in table aligned data for any other extension
18
19
 
20
+ ### Catalog Builder
21
+ Build and update INTEGRAL/ISGRI science window catalogs:
22
+ - Automatic discovery of new science windows in archive
23
+ - Parallel processing of quality metrics
24
+ - Optional light curve caching
25
+ - Incremental catalog updates
26
+
19
27
  ### Light Curve Analysis
20
28
  Extract and analyze ISGRI light curves:
21
29
  - Load from file paths or SWID/source lookup
@@ -43,6 +51,9 @@ isgri config-set --archive /path/to/archive --catalog ~/data/scw_catalog.fits --
43
51
  # View current config
44
52
  isgri config
45
53
 
54
+ # Update catalog from archive
55
+ isgri update
56
+
46
57
  # Interactive catalog query
47
58
  isgri query
48
59
  # query> time
@@ -92,6 +103,51 @@ swids = cat.get_swids()
92
103
  print(f"Found {len(results)} observations")
93
104
  ```
94
105
 
106
+ ### Build/Update SCW Catalog
107
+
108
+ #### Command Line
109
+
110
+ ```bash
111
+ # Update catalog using configured paths
112
+ isgri update
113
+
114
+ # Update with custom paths
115
+ isgri update --archive /anita/archivio/ --catalog ~/data/catalog.fits
116
+
117
+ # Enable light curve caching (15-1000 keV, 1s bins)
118
+ isgri update --cache ~/data/lightcurves/
119
+
120
+ # Limit CPU cores for parallel processing
121
+ isgri update --cores 4
122
+ ```
123
+
124
+ #### Python API
125
+
126
+ ```python
127
+ from isgri.catalog import CatalogBuilder
128
+
129
+ # Create builder instance
130
+ builder = CatalogBuilder(
131
+ archive_path="/path/to/archive",
132
+ catalog_path="scw_catalog.fits",
133
+ lightcurve_cache="/path/to/cache", # optional
134
+ n_cores=8
135
+ )
136
+
137
+ # Update catalog with new science windows
138
+ builder.update_catalog()
139
+
140
+ # Find all science windows in archive
141
+ swids, paths = builder.find_scws()
142
+ print(f"Found {len(swids)} science windows")
143
+ ```
144
+
145
+ The builder:
146
+ - Scans archive for new ScWs not in catalog
147
+ - Computes quality metrics (raw, sigma-clipped, GTI-filtered chi-squared)
148
+ - Processes in parallel by revolution
149
+ - Optionally caches 1s light curves (15-1000 keV)
150
+
95
151
  ### Analyze Light Curves
96
152
 
97
153
  ```python