isgri 0.6.0__tar.gz → 0.7.0__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 (45) hide show
  1. {isgri-0.6.0 → isgri-0.7.0}/.gitignore +217 -217
  2. {isgri-0.6.0 → isgri-0.7.0}/.python-version +1 -1
  3. {isgri-0.6.0 → isgri-0.7.0}/PKG-INFO +93 -27
  4. isgri-0.7.0/README.md +193 -0
  5. isgri-0.7.0/demo/lightcurve_walkthrough.ipynb +420 -0
  6. {isgri-0.6.0 → isgri-0.7.0}/demo/scwquery_walkthrough.ipynb +762 -762
  7. {isgri-0.6.0 → isgri-0.7.0}/pyproject.toml +2 -1
  8. isgri-0.7.0/src/isgri/__version__.py +1 -0
  9. isgri-0.7.0/src/isgri/catalog/__init__.py +4 -0
  10. isgri-0.7.0/src/isgri/catalog/builder.py +432 -0
  11. {isgri-0.6.0 → isgri-0.7.0}/src/isgri/catalog/scwquery.py +45 -16
  12. {isgri-0.6.0 → isgri-0.7.0}/src/isgri/cli/__init__.py +1 -1
  13. {isgri-0.6.0 → isgri-0.7.0}/src/isgri/cli/main.py +185 -168
  14. {isgri-0.6.0 → isgri-0.7.0}/src/isgri/cli/query.py +210 -172
  15. {isgri-0.6.0 → isgri-0.7.0}/src/isgri/config.py +37 -9
  16. {isgri-0.6.0 → isgri-0.7.0}/src/isgri/utils/file_loaders.py +171 -30
  17. {isgri-0.6.0 → isgri-0.7.0}/src/isgri/utils/lightcurve.py +103 -13
  18. {isgri-0.6.0 → isgri-0.7.0}/src/isgri/utils/pif.py +14 -0
  19. {isgri-0.6.0 → isgri-0.7.0}/src/isgri/utils/quality.py +4 -3
  20. isgri-0.7.0/tests/catalog/test_builder.py +310 -0
  21. {isgri-0.6.0 → isgri-0.7.0}/tests/test_config.py +39 -13
  22. isgri-0.7.0/tests/utils/test_file_loaders.py +328 -0
  23. isgri-0.7.0/tests/utils/test_lightcurve.py +561 -0
  24. isgri-0.6.0/README.md +0 -128
  25. isgri-0.6.0/demo/lightcurve_walkthrough.ipynb +0 -398
  26. isgri-0.6.0/src/isgri/__version__.py +0 -1
  27. isgri-0.6.0/src/isgri/catalog/__init__.py +0 -3
  28. isgri-0.6.0/src/isgri/catalog/builder.py +0 -90
  29. isgri-0.6.0/tests/utils/test_file_loaders.py +0 -76
  30. isgri-0.6.0/tests/utils/test_lightcurve.py +0 -286
  31. {isgri-0.6.0 → isgri-0.7.0}/LICENSE +0 -0
  32. {isgri-0.6.0 → isgri-0.7.0}/demo/data/255900280010_isgri_model.fits.gz +0 -0
  33. {isgri-0.6.0 → isgri-0.7.0}/demo/data/isgri_events.fits.gz +0 -0
  34. {isgri-0.6.0 → isgri-0.7.0}/src/isgri/__init__.py +0 -0
  35. {isgri-0.6.0 → isgri-0.7.0}/src/isgri/catalog/wcs.py +0 -0
  36. {isgri-0.6.0 → isgri-0.7.0}/src/isgri/utils/__init__.py +0 -0
  37. {isgri-0.6.0 → isgri-0.7.0}/src/isgri/utils/time_conversion.py +0 -0
  38. {isgri-0.6.0 → isgri-0.7.0}/tests/__init__.py +0 -0
  39. {isgri-0.6.0 → isgri-0.7.0}/tests/catalog/test_scwquery.py +0 -0
  40. {isgri-0.6.0 → isgri-0.7.0}/tests/catalog/test_wcs.py +0 -0
  41. {isgri-0.6.0 → isgri-0.7.0}/tests/cli/test_main.py +0 -0
  42. {isgri-0.6.0 → isgri-0.7.0}/tests/utils/__init__.py +0 -0
  43. {isgri-0.6.0 → isgri-0.7.0}/tests/utils/test_pif.py +0 -0
  44. {isgri-0.6.0 → isgri-0.7.0}/tests/utils/test_quality.py +0 -0
  45. {isgri-0.6.0 → isgri-0.7.0}/tests/utils/test_time_conversion.py +0 -0
@@ -1,218 +1,218 @@
1
- # Byte-compiled / optimized / DLL files
2
- __pycache__/
3
- *.py[codz]
4
- *$py.class
5
-
6
- # C extensions
7
- *.so
8
-
9
- # Distribution / packaging
10
- .Python
11
- build/
12
- develop-eggs/
13
- dist/
14
- downloads/
15
- eggs/
16
- .eggs/
17
- lib/
18
- lib64/
19
- parts/
20
- sdist/
21
- var/
22
- wheels/
23
- share/python-wheels/
24
- *.egg-info/
25
- .installed.cfg
26
- *.egg
27
- MANIFEST
28
-
29
- # PyInstaller
30
- # Usually these files are written by a python script from a template
31
- # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
- *.manifest
33
- *.spec
34
-
35
- # Installer logs
36
- pip-log.txt
37
- pip-delete-this-directory.txt
38
-
39
- # Unit test / coverage reports
40
- htmlcov/
41
- .tox/
42
- .nox/
43
- .coverage
44
- .coverage.*
45
- .cache
46
- nosetests.xml
47
- coverage.xml
48
- *.cover
49
- *.py.cover
50
- .hypothesis/
51
- .pytest_cache/
52
- cover/
53
-
54
- # Translations
55
- *.mo
56
- *.pot
57
-
58
- # Django stuff:
59
- *.log
60
- local_settings.py
61
- db.sqlite3
62
- db.sqlite3-journal
63
-
64
- # Flask stuff:
65
- instance/
66
- .webassets-cache
67
-
68
- # Scrapy stuff:
69
- .scrapy
70
-
71
- # Sphinx documentation
72
- docs/_build/
73
-
74
- # PyBuilder
75
- .pybuilder/
76
- target/
77
-
78
- # Jupyter Notebook
79
- .ipynb_checkpoints
80
-
81
- # IPython
82
- profile_default/
83
- ipython_config.py
84
-
85
- # pyenv
86
- # For a library or package, you might want to ignore these files since the code is
87
- # intended to run in multiple environments; otherwise, check them in:
88
- # .python-version
89
-
90
- # pipenv
91
- # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
- # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
- # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
- # install all needed dependencies.
95
- # Pipfile.lock
96
-
97
- # UV
98
- # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
- # This is especially recommended for binary packages to ensure reproducibility, and is more
100
- # commonly ignored for libraries.
101
- # uv.lock
102
-
103
- # poetry
104
- # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
- # This is especially recommended for binary packages to ensure reproducibility, and is more
106
- # commonly ignored for libraries.
107
- # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
- # poetry.lock
109
- # poetry.toml
110
-
111
- # pdm
112
- # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
- # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
- # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
- # pdm.lock
116
- # pdm.toml
117
- .pdm-python
118
- .pdm-build/
119
-
120
- # pixi
121
- # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
- # pixi.lock
123
- # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
- # in the .venv directory. It is recommended not to include this directory in version control.
125
- .pixi
126
-
127
- # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
- __pypackages__/
129
-
130
- # Celery stuff
131
- celerybeat-schedule
132
- celerybeat.pid
133
-
134
- # Redis
135
- *.rdb
136
- *.aof
137
- *.pid
138
-
139
- # RabbitMQ
140
- mnesia/
141
- rabbitmq/
142
- rabbitmq-data/
143
-
144
- # ActiveMQ
145
- activemq-data/
146
-
147
- # SageMath parsed files
148
- *.sage.py
149
-
150
- # Environments
151
- .env
152
- .envrc
153
- .venv
154
- env/
155
- venv/
156
- ENV/
157
- env.bak/
158
- venv.bak/
159
-
160
- # Spyder project settings
161
- .spyderproject
162
- .spyproject
163
-
164
- # Rope project settings
165
- .ropeproject
166
-
167
- # mkdocs documentation
168
- /site
169
-
170
- # mypy
171
- .mypy_cache/
172
- .dmypy.json
173
- dmypy.json
174
-
175
- # Pyre type checker
176
- .pyre/
177
-
178
- # pytype static type analyzer
179
- .pytype/
180
-
181
- # Cython debug symbols
182
- cython_debug/
183
-
184
- # PyCharm
185
- # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
186
- # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
187
- # and can be added to the global gitignore or merged into this file. For a more nuclear
188
- # option (not recommended) you can uncomment the following to ignore the entire idea folder.
189
- # .idea/
190
-
191
- # Abstra
192
- # Abstra is an AI-powered process automation framework.
193
- # Ignore directories containing user credentials, local state, and settings.
194
- # Learn more at https://abstra.io/docs
195
- .abstra/
196
-
197
- # Visual Studio Code
198
- # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
199
- # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
200
- # and can be added to the global gitignore or merged into this file. However, if you prefer,
201
- # you could uncomment the following to ignore the entire vscode folder
202
- .vscode/
203
-
204
- # Ruff stuff:
205
- .ruff_cache/
206
-
207
- # PyPI configuration file
208
- .pypirc
209
-
210
- # Marimo
211
- marimo/_static/
212
- marimo/_lsp/
213
- __marimo__/
214
-
215
- # Streamlit
216
- .streamlit/secrets.toml
217
-
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ # Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ # poetry.lock
109
+ # poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ # pdm.lock
116
+ # pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ # pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # Redis
135
+ *.rdb
136
+ *.aof
137
+ *.pid
138
+
139
+ # RabbitMQ
140
+ mnesia/
141
+ rabbitmq/
142
+ rabbitmq-data/
143
+
144
+ # ActiveMQ
145
+ activemq-data/
146
+
147
+ # SageMath parsed files
148
+ *.sage.py
149
+
150
+ # Environments
151
+ .env
152
+ .envrc
153
+ .venv
154
+ env/
155
+ venv/
156
+ ENV/
157
+ env.bak/
158
+ venv.bak/
159
+
160
+ # Spyder project settings
161
+ .spyderproject
162
+ .spyproject
163
+
164
+ # Rope project settings
165
+ .ropeproject
166
+
167
+ # mkdocs documentation
168
+ /site
169
+
170
+ # mypy
171
+ .mypy_cache/
172
+ .dmypy.json
173
+ dmypy.json
174
+
175
+ # Pyre type checker
176
+ .pyre/
177
+
178
+ # pytype static type analyzer
179
+ .pytype/
180
+
181
+ # Cython debug symbols
182
+ cython_debug/
183
+
184
+ # PyCharm
185
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
186
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
187
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
188
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
189
+ # .idea/
190
+
191
+ # Abstra
192
+ # Abstra is an AI-powered process automation framework.
193
+ # Ignore directories containing user credentials, local state, and settings.
194
+ # Learn more at https://abstra.io/docs
195
+ .abstra/
196
+
197
+ # Visual Studio Code
198
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
199
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
200
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
201
+ # you could uncomment the following to ignore the entire vscode folder
202
+ .vscode/
203
+
204
+ # Ruff stuff:
205
+ .ruff_cache/
206
+
207
+ # PyPI configuration file
208
+ .pypirc
209
+
210
+ # Marimo
211
+ marimo/_static/
212
+ marimo/_lsp/
213
+ __marimo__/
214
+
215
+ # Streamlit
216
+ .streamlit/secrets.toml
217
+
218
218
  docs/**
@@ -1 +1 @@
1
- 3.9
1
+ 3.9
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: isgri
3
- Version: 0.6.0
3
+ Version: 0.7.0
4
4
  Summary: Python package for INTEGRAL IBIS/ISGRI lightcurve analysis
5
5
  Author: Dominik Patryk Pacholski
6
6
  License: MIT
@@ -8,6 +8,7 @@ License-File: LICENSE
8
8
  Requires-Python: >=3.9
9
9
  Requires-Dist: astropy
10
10
  Requires-Dist: click
11
+ Requires-Dist: joblib
11
12
  Requires-Dist: numpy
12
13
  Requires-Dist: platformdirs
13
14
  Requires-Dist: tomli-w
@@ -22,19 +23,20 @@ Python toolkit for INTEGRAL/ISGRI data analysis.
22
23
 
23
24
  ### Command Line Interface
24
25
  Query catalogs directly from the terminal:
26
+ - Interactive and direct query modes
25
27
  - Filter by time, position, quality, revolution
26
- - Export results to FITS/CSV
27
- - List SWIDs for batch processing
28
+ - Export results to FITS/CSV or SWID lists
28
29
 
29
30
  ### SCW Catalog Query
30
31
  Query INTEGRAL Science Window catalogs with a fluent Python API:
31
32
  - Filter by time, position, quality, revolution
32
33
  - Calculate detector offsets
33
- - Export results to FITS/CSV
34
+ - Export results to any auto detectable astropy table extension or in table aligned data for any other extension
34
35
 
35
36
  ### Light Curve Analysis
36
37
  Extract and analyze ISGRI light curves:
37
- - Event loading with PIF weighting
38
+ - Load from file paths or SWID/source lookup
39
+ - PIF weighting with adjustable thresholds
38
40
  - Custom time binning
39
41
  - Module-by-module analysis
40
42
  - Quality metrics (chi-squared tests)
@@ -53,18 +55,26 @@ pip install isgri
53
55
 
54
56
  ```bash
55
57
  # Configure default paths (once)
56
- isgri config-set --catalog ~/data/scw_catalog.fits
58
+ isgri config-set --archive /path/to/archive --catalog ~/data/scw_catalog.fits --pif /path/to/pif
57
59
 
58
- # Interactive method
59
- isgri query
60
-
61
- # Query by time range
62
- isgri query --tstart 2010-01-01 --tstop 2010-12-31
63
-
64
- # Query Crab with quality cut
65
- isgri query --ra 83.63 --dec 22.01 --max-chi 2.0 --fov full
60
+ # View current config
61
+ isgri config
66
62
 
67
- # Get list of SWIDs for processing
63
+ # Interactive catalog query
64
+ isgri query
65
+ # query> time
66
+ # Start: 2010-01-01
67
+ # Stop: 2010-12-31
68
+ # → 1234 SCWs
69
+ # query> pos
70
+ # RA: 83.63
71
+ # Dec: 22.01
72
+ # ...
73
+
74
+ # Direct catalog query
75
+ isgri query --tstart 2010-01-01 --tstop 2010-12-31 --ra 83.63 --dec 22.01 --max-chi 2.0
76
+
77
+ # Get SWID list for batch processing
68
78
  isgri query --tstart 3000 --tstop 3100 --list-swids > swids.txt
69
79
 
70
80
  # Export results
@@ -87,6 +97,15 @@ results = (cat
87
97
  .get()
88
98
  )
89
99
 
100
+ # Filter by revolution(s)
101
+ results = cat.revolution([1000, 1001, 1002]).get()
102
+
103
+ # Save selected columns
104
+ cat.write('results.fits', columns=['SWID', 'TSTART', 'TSTOP'])
105
+
106
+ # Get SWID list
107
+ swids = cat.get_swids()
108
+
90
109
  print(f"Found {len(results)} observations")
91
110
  ```
92
111
 
@@ -95,20 +114,49 @@ print(f"Found {len(results)} observations")
95
114
  ```python
96
115
  from isgri.utils import LightCurve, QualityMetrics
97
116
 
98
- # Load events with PIF weighting
117
+ # Method 1: Load from file paths
99
118
  lc = LightCurve.load_data(
100
119
  events_path="isgri_events.fits",
101
120
  pif_path="source_model.fits",
121
+ use_pif=True,
122
+ pif_threshold=0.5
123
+ )
124
+
125
+ # Method 2: Load by SWID (requires config)
126
+ lc = LightCurve.load_data(swid="255900280010")
127
+
128
+ # Method 3: Load by SWID + source (auto-finds PIF)
129
+ lc = LightCurve.load_data(
130
+ swid="255900280010",
131
+ source="SGR1935",
132
+ use_pif=True,
102
133
  pif_threshold=0.5
103
134
  )
104
135
 
105
- # Create 1-second binned light curve
106
- time, counts = lc.rebin(binsize=1.0, emin=20, emax=100)
136
+ # Create binned lightcurve
137
+ time, counts = lc.rebin(binsize=1.0, emin=30, emax=100)
138
+
139
+ # Override PIF settings temporarily
140
+ time, counts = lc.rebin(binsize=1.0, emin=30, emax=100, use_pif=True, pif_threshold=0.8)
141
+
142
+ # Or change instance settings
143
+ lc.pif_threshold = 0.7
144
+ lc.use_pif = True
145
+ time, counts = lc.rebin(binsize=1.0, emin=30, emax=100)
146
+
147
+ # Module-by-module analysis
148
+ times, module_counts = lc.rebin_by_modules(binsize=1.0, emin=30, emax=300)
149
+
150
+ # Quality metrics
151
+ qm = QualityMetrics(lc, binsize=1.0, emin=30, emax=100)
152
+ chi_raw = qm.raw_chi_squared()
153
+ chi_clipped = qm.sigma_clip_chi_squared(sigma=1)
154
+ chi_gti = qm.gti_chi_squared()
155
+ print(f"Chisq/dof = {chi_raw:.2f}")
107
156
 
108
- # Compute quality metrics
109
- qm = QualityMetrics(lc, binsize=1.0, emin=20, emax=100)
110
- chi = qm.raw_chi_squared()
111
- print(f"Chisq/dof = {chi:.2f}")
157
+ # Time conversions
158
+ from isgri.utils.time_conversion import ijd2utc, utc2ijd
159
+ print(f"Start time: {ijd2utc(lc.t0)}")
112
160
  ```
113
161
 
114
162
  ## Configuration
@@ -120,17 +168,30 @@ ISGRI stores configuration in default config folder for each system (see: platfo
120
168
  isgri config
121
169
 
122
170
  # Set paths
123
- isgri config-set --archive /path/to/archive --catalog /path/to/catalog.fits
171
+ isgri config-set --archive /path/to/archive
172
+ isgri config-set --catalog /path/to/catalog.fits
173
+ isgri config-set --pif /path/to/pif
174
+
175
+ # Set all at once
176
+ isgri config-set --archive /path/to/archive --catalog /path/to/catalog.fits --pif /path/to/pif
124
177
  ```
125
178
 
126
- Config can also be used in Python:
179
+ Config in Python:
127
180
 
128
181
  ```python
129
- from isgri.config import get_config
182
+ from isgri.config import Config
130
183
 
131
- cfg = get_config()
184
+ cfg = Config()
132
185
  print(cfg.archive_path)
133
186
  print(cfg.catalog_path)
187
+ print(cfg.pif_path)
188
+
189
+ # Create new config programmatically
190
+ cfg.create_new(
191
+ archive_path="/path/to/archive",
192
+ catalog_path="/path/to/catalog.fits",
193
+ pif_path="/path/to/pif"
194
+ )
134
195
  ```
135
196
 
136
197
  Local config file `isgri_config.toml` in current directory overrides global config.
@@ -141,4 +202,9 @@ Local config file `isgri_config.toml` in current directory overrides global conf
141
202
  - **CLI Reference**: Run `isgri --help` or `isgri <command> --help`
142
203
  - **Catalog Tutorial**: [scwquery_walkthrough.ipynb](https://github.com/dominp/isgri/blob/main/demo/scwquery_walkthrough.ipynb)
143
204
  - **Light Curve Tutorial**: [lightcurve_walkthrough.ipynb](https://github.com/dominp/isgri/blob/main/demo/lightcurve_walkthrough.ipynb)
144
- - **API Reference**: Use `help()` in Python or see docstrings
205
+ - **API Reference**: Use `help()` in Python or see docstrings
206
+
207
+
208
+ ## License
209
+
210
+ MIT