tess-ida-tools 1.0.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 (37) hide show
  1. tess_ida_tools-1.0.0/.gitignore +172 -0
  2. tess_ida_tools-1.0.0/LICENSE +21 -0
  3. tess_ida_tools-1.0.0/PKG-INFO +343 -0
  4. tess_ida_tools-1.0.0/README.md +288 -0
  5. tess_ida_tools-1.0.0/doc/TESS-IDA-TOOLS-Example.ipynb +972 -0
  6. tess_ida_tools-1.0.0/doc/TESS-IDA-TOOLS-Example.md +570 -0
  7. tess_ida_tools-1.0.0/doc/get-tess-ida.md +128 -0
  8. tess_ida_tools-1.0.0/doc/output_43_1.png +0 -0
  9. tess_ida_tools-1.0.0/doc/output_44_0.png +0 -0
  10. tess_ida_tools-1.0.0/doc/output_47_1.png +0 -0
  11. tess_ida_tools-1.0.0/doc/output_48_1.png +0 -0
  12. tess_ida_tools-1.0.0/get-tess-ida.py +272 -0
  13. tess_ida_tools-1.0.0/justfile +114 -0
  14. tess_ida_tools-1.0.0/pyproject.toml +82 -0
  15. tess_ida_tools-1.0.0/setup.cfg +7 -0
  16. tess_ida_tools-1.0.0/src/tess/__init__.py +0 -0
  17. tess_ida_tools-1.0.0/src/tess/_version.py +16 -0
  18. tess_ida_tools-1.0.0/src/tess/ida/__init__.py +9 -0
  19. tess_ida_tools-1.0.0/src/tess/ida/_version.py +16 -0
  20. tess_ida_tools-1.0.0/src/tess/ida/constants.py +100 -0
  21. tess_ida_tools-1.0.0/src/tess/ida/dbase/__init__.py +24 -0
  22. tess_ida_tools-1.0.0/src/tess/ida/dbase/api.py +113 -0
  23. tess_ida_tools-1.0.0/src/tess/ida/dbase/schema.py +254 -0
  24. tess_ida_tools-1.0.0/src/tess/ida/dbase/sql/__init__.py +0 -0
  25. tess_ida_tools-1.0.0/src/tess/ida/dbase/sql/schema.sql +32 -0
  26. tess_ida_tools-1.0.0/src/tess/ida/download.py +357 -0
  27. tess_ida_tools-1.0.0/src/tess/ida/pipeline.py +272 -0
  28. tess_ida_tools-1.0.0/src/tess/ida/timeseries.py +573 -0
  29. tess_ida_tools-1.0.0/src/tess/ida/utils.py +81 -0
  30. tess_ida_tools-1.0.0/src/tess_ida_tools.egg-info/PKG-INFO +343 -0
  31. tess_ida_tools-1.0.0/src/tess_ida_tools.egg-info/SOURCES.txt +36 -0
  32. tess_ida_tools-1.0.0/src/tess_ida_tools.egg-info/dependency_links.txt +1 -0
  33. tess_ida_tools-1.0.0/src/tess_ida_tools.egg-info/entry_points.txt +5 -0
  34. tess_ida_tools-1.0.0/src/tess_ida_tools.egg-info/requires.txt +11 -0
  35. tess_ida_tools-1.0.0/src/tess_ida_tools.egg-info/top_level.txt +1 -0
  36. tess_ida_tools-1.0.0/tox.ini +17 -0
  37. tess_ida_tools-1.0.0/uv.lock +1002 -0
@@ -0,0 +1,172 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
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
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
110
+ .pdm.toml
111
+ .pdm-python
112
+ .pdm-build/
113
+
114
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115
+ __pypackages__/
116
+
117
+ # Celery stuff
118
+ celerybeat-schedule
119
+ celerybeat.pid
120
+
121
+ # SageMath parsed files
122
+ *.sage.py
123
+
124
+ # Environments
125
+ .env
126
+ .venv
127
+ env/
128
+ venv/
129
+ ENV/
130
+ env.bak/
131
+ venv.bak/
132
+
133
+ # Spyder project settings
134
+ .spyderproject
135
+ .spyproject
136
+
137
+ # Rope project settings
138
+ .ropeproject
139
+
140
+ # mkdocs documentation
141
+ /site
142
+
143
+ # mypy
144
+ .mypy_cache/
145
+ .dmypy.json
146
+ dmypy.json
147
+
148
+ # Pyre type checker
149
+ .pyre/
150
+
151
+ # pytype static type analyzer
152
+ .pytype/
153
+
154
+ # Cython debug symbols
155
+ cython_debug/
156
+
157
+ # PyCharm
158
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
161
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
162
+ #.idea/
163
+
164
+ # =========
165
+ # Own stuff
166
+ # =========
167
+ _version.py
168
+ *.ecsv
169
+ *.dat
170
+ *.db
171
+ NOTES
172
+ .ruff_cache
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 STARS4ALL
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,343 @@
1
+ Metadata-Version: 2.1
2
+ Name: tess-ida-tools
3
+ Version: 1.0.0
4
+ Summary: Collection of utilities to download and analize TESS Photometer Network data from IDA files
5
+ Author-email: Rafael González <rafael08@ucm.es>, Jaime Zamorano <jzamorano@fis.ucm.es>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2024 STARS4ALL
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/STARS4ALL/TESS-IDA-TOOLS
29
+ Project-URL: Repository, https://github.com/STARS4ALL/TESS-IDA-TOOLS.git
30
+ Classifier: Programming Language :: Python :: 3.9
31
+ Classifier: Programming Language :: Python :: 3.10
32
+ Classifier: Programming Language :: Python :: 3.11
33
+ Classifier: Programming Language :: Python :: 3.12
34
+ Classifier: Development Status :: 4 - Beta
35
+ Classifier: Environment :: Console
36
+ Classifier: Intended Audience :: Science/Research
37
+ Classifier: License :: OSI Approved :: MIT License
38
+ Classifier: Operating System :: POSIX :: Linux
39
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
40
+ Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
41
+ Requires-Python: >=3.9
42
+ Description-Content-Type: text/markdown
43
+ License-File: LICENSE
44
+ Requires-Dist: typing-extensions
45
+ Requires-Dist: StrEnum
46
+ Requires-Dist: python-decouple
47
+ Requires-Dist: python-dateutil
48
+ Requires-Dist: tabulate
49
+ Requires-Dist: aiofiles
50
+ Requires-Dist: aiohttp
51
+ Requires-Dist: aiodns
52
+ Requires-Dist: astropy
53
+ Requires-Dist: astroplan
54
+ Requires-Dist: lica>=1.0.1
55
+
56
+ # TESS-IDA-TOOLS
57
+
58
+ Collection of utilities to download and analyze TESS Photometer Network data from IDA files.
59
+
60
+ *If all that you need is simply to download IDA monthly files from our NextCloud Server, our
61
+ simple [get-tess-ida.py](doc/get-tess-ida.md) script is all that you need. Read no further.*
62
+
63
+ ## Summary
64
+ * [Installation and configuration](#installation-and-configuration).
65
+ * [Available utilities](#available-utilities).
66
+ * [Usage example](#simple-usage-example).
67
+ * [The IDA monthly files](#tess-ida-monthly-files).
68
+ * [The auxiliar database](#the-auxiliar-database)
69
+
70
+ ## Installation and configuration
71
+
72
+ ### Installation
73
+
74
+ We strongly recommend making a Python virtual environment where you install this package and other packages related to your data analysis. A very popular way is to use [Jupyter Notebooks](https://jupyter.org/), so lets do this as an example.
75
+
76
+ The following lines create a jupyter folder from our home directory, a new Python virtual environment named `.venv` and activate it.
77
+ ```bash
78
+ ~$ mkdir jupyter
79
+ cd jupyter
80
+ jupyter$ python3 -m venv .venv
81
+ jupyter$ source .venv/bin/activate
82
+ (.venv) jupyter$
83
+ ```
84
+
85
+ Now we install jupyter and matplotlib for the charts:
86
+
87
+ ```bash
88
+ pip install -U pip
89
+ pip install notebook matplotlib
90
+ ```
91
+
92
+ Finally, we can install the latest stable release of the tools from PyPi:
93
+ ```bash
94
+ pip install tess-ida-tools
95
+ ```
96
+ or use the latest development version from our [GitHub repository](https://github.com/STARS4ALL/TESS-IDA-TOOLS):
97
+
98
+ ```bash
99
+ pip install git+https://github.com/STARS4ALL/TESS-IDA-TOOLS#main
100
+ ```
101
+
102
+ ### Configuration
103
+
104
+ With the help of a text editor, create a new auxiliar environment file called `.env`
105
+ Inside this file, you must add two environment variables:
106
+
107
+ ```text
108
+ IDA_URL=<NextCloud Server IDA base URL>
109
+ DATABASE_FILE=adm/tessida.db
110
+ ```
111
+
112
+ The first one contains the base URL of our NextCloud Server where we publish the IDA files (and you should already have)
113
+ The second one is the path of an auxiliar SQLite database file that help us in the process of download and convert IDA files to ECSV
114
+
115
+ The example above shows that we will create an `adm` subdirectory inside our working directory `~/jupyter` and a database file named `tessida.db`.
116
+
117
+ As the final step, we must initialize the database:
118
+
119
+ ```bash
120
+ tess-ida-db --console schema create
121
+ ```
122
+
123
+ ***Warning*** When issuing the `tess-ida-db schema create` command, the previous database file is deleted !
124
+
125
+ All the configuration is done now.
126
+
127
+ ## Available Utilities
128
+
129
+ The TESS-IDA-TOOLS comprises the following scripts:
130
+ * `tess-ida-db`. Auxiliar database management,
131
+ * `tess-ida-get`. Download series of IDA monthly files.
132
+ * `tess-ida-ecsv`. Transform series of monthly files. Combine series of ECSV files into one.
133
+ * `tess-ida-pipe`. The complete download/transform/combine pipeline
134
+
135
+ All script support the following ***generic options***:
136
+ * `--version`. Prints software version and quits.
137
+ * `--console`. Prints execution info on the terminal console (up to level INFO)
138
+ * `--log-file`. Appends the same execution info to a log file
139
+ * `--quiet`. Suppresses all messages except CRITICAL, ERROR and WARNING.
140
+ * `--verbose`. Includes DEBUG level messages.
141
+
142
+ All scripts include a help system (`-h` or `--help`) to describe the available commands and command options.
143
+
144
+ Examples:
145
+
146
+ ```bash
147
+ tess-ida-get -h
148
+ ```
149
+
150
+ shows that this script has three commands: `single`, `range` and `photometers`
151
+
152
+ Typing:
153
+
154
+ ```bash
155
+ tess-ida-get single -h
156
+ tess-ida-get range -h
157
+ tess-ida-get photometers -h
158
+ ```
159
+
160
+ will show available options for each command. The generic options always come *before* the command.
161
+
162
+ Example:
163
+
164
+ ```bash
165
+ tess-ida-get --console --quiet photometers --list 1 703 328 --since 2024-03 --until 2024-07
166
+ ```
167
+
168
+ The command above download range of files for photometers stars1 stars703 and stars328.
169
+
170
+ Many commands include `-s | --since` and `-u | --until` options.
171
+ If not specified, the default values are the previous month and current month respectively.
172
+
173
+ Many commands include `-i | --input-dir` and `-o | output-dir` options.
174
+ If not specified, the default value is the current working directory, like in the example above.
175
+
176
+ ## Simple usage example
177
+
178
+ ### Getting the IDA files and converting them to ECSV
179
+
180
+ In your jupyter working directory, with the activated virtual environment, type:
181
+
182
+ ```bash
183
+ (.venv) jupyter$ tess-ida-pipe --console range -n stars289 -s 2019-05 -u 2023-06 -i IDA -o ECSV
184
+ ```
185
+
186
+ The above utility `tess-ida-pipe` is the complete pipeline that:
187
+ 1. Downloads a range of IDA monthly files for stars289 since 2019-05 until 2023-06, placing them under `IDA/stars289` subdirectory.
188
+ 2. Transforms them to ECSV files under `ECSV/stars289`.
189
+ 3. Merges them into a combined time series file named `ECSV/stars289/since_2019-05_until_2023-06.ecsv`
190
+
191
+ As the final product for this step, we have the `ECSV/stars289/since_2019-05_until_2023-06.ecsv` ready to be analyzed in a Jupyter notebook.
192
+
193
+ ***NOTES***:
194
+
195
+ 1. Note that the transformation process will take a while (1-2 min per file), since every monthly file is added Solar Altitude, Moon Altitude and Moon Phase. However, if you re-run the script again, it will download all the files but will skip the transform part because the software detects no changes in IDA files.
196
+
197
+ 2. When combining a range of dates, all monthly files metadata should be the same. If this not happens, the tool will issue a warning and the ***lastest month*** is used as metadata for the combined ECSV file. It is recommended to inspect the IDA files manually to locate the differences and contact us to fix them if possible.
198
+
199
+ ### Launching Jupyter
200
+
201
+ The second step to perform in the command line is launching Jupyter Notebook. From then all, all processing will be done in an notebook.
202
+
203
+ ```bash
204
+ jupyer notebook
205
+ ```
206
+
207
+ A snapshot of the notebook can be seen [here](doc/TESS-IDA-TOOLS-Example.md)
208
+
209
+ ## TESS IDA Monthly Files
210
+
211
+ Readings from all TESS network are stored in a database at UCM, which also publish a series of monthly files per photometer in a NextCloud Server, known as the 'IDA Monthly Files' . For all active photometers, the current month is updated daily with a delay of one day.
212
+
213
+ The format was defined by [Dark Sky International](https://darksky.org/). The IDA Monthly files are basically a CSV file with an extra 35 line header containing additional metadata in readable text.
214
+
215
+ IDA file header example:
216
+
217
+ ```text
218
+ # Definition of the community standard for skyglow observations 1.0
219
+ # URL: http://www.darksky.org/NSBM/sdf1.0.pdf
220
+ # Number of header lines: 35
221
+ # This data is released under the following license: ODbL 1.0 http://opendatacommons.org/licenses/odbl/summary/
222
+ # Device type: TESS-W
223
+ # Instrument ID: stars1
224
+ # Data supplier: Cristóbal García / None
225
+ # Location name: Coslada, barrio de La Estación / Coslada/ Área metropolitana de Madrid y Corredor del Henares / Community of Madrid / Spain
226
+ # Position: 40.4246043, -3.560279, 0.0
227
+ # Local timezone: Europe/Madrid
228
+ # Time Synchronization: timestamp added by MQTT subscriber
229
+ # Moving / Stationary position: STATIONARY
230
+ # Moving / Fixed look direction: FIXED
231
+ # Number of channels: 1
232
+ # Filters per channel: None
233
+ # Measurement direction per channel: (0.0, 0.0)
234
+ # Field of view: 17.0
235
+ # Number of fields per line: 8
236
+ # TESS MAC address: 18:FE:34:CF:E9:5A
237
+ # TESS firmware version: 1.0
238
+ # TESS cover offset value: 0.0
239
+ # TESS zero point: 20.1
240
+ # Comment:
241
+ # Comment:
242
+ # Comment:
243
+ # Comment:
244
+ # Comment:
245
+ # Comment:
246
+ # Comment: MSAS = ZP - 2.5*log10(Frequency)
247
+ # blank line 30
248
+ # blank line 31
249
+ # blank line 32
250
+ # UTC Date & Time, Local Date & Time, Enclosure Temperature, Sky Temperature, Frequency, MSAS, ZP, Sequence Number
251
+ # YYYY-MM-DDTHH:mm:ss.fff;YYYY-MM-DDTHH:mm:ss.fff;Celsius;Celsius;Hz;mag/arcsec^2;mag/arcsec^2; Multiple of Tx period
252
+ # END OF HEADER
253
+ ```
254
+
255
+ From time to time, we update the IDA monthly files repository. In the 99% of the cases, the update is due to fix to unknown metadata in the headers, such as the `Position`, `Location name` or `Data supplier`. The `Position` is specially important for data analysis. So, you should not rely on inmutable IDA files and we recommend that you download the latest IDA files for the photometers of interest.
256
+
257
+ ### From CSV to ECSV
258
+
259
+ The [AstroPy Python Library](https://docs.astropy.org/en/stable/index.html#) offers a very convenient `tables utility` to analyze tabular times series data like these. These tables can be loaded, manipulated (queried, filtered, augmented, etc) and finally stored to a file in another text-based format named ECSV. This ECSV format also follows the convention of placing a header before ordinary CSV data and it is meant to recreate a Table variable in your python scripts exactly as it was written, with all the column names, data types, additional metadata.
260
+
261
+ As part of this tools package, there are utilities to parse IDA monthly files amd convert them to ECSV montly files and combine some them to a ceratin time frame. The IDA metadata is contained in a `table.meta['ida']` dictionary.
262
+
263
+ ## The Auxiliar Database
264
+
265
+ The TESS-IDA-TOOLS work with an auxiliary database with the purpose of being efficient in transforming monthly IDA files to monthly ECSV files.
266
+ There are two issues to solve:
267
+ * Detect change of monthly IDA files (most likely metadata)
268
+ * Supply `Position` coordinates when needed if the IDA monthly file doesn't provide them.
269
+
270
+ ### IDA Monthly Files change
271
+
272
+ Computing Sun & Moon data for a monthly file takes about 1-2 minutes, depending on the file size and computer. This must be multiplied for the number of downloaded files. This is unavoidable the first time the files are downloaded. However, unnecesary recalculations should be avoided when re-runing the pipeline. The problem is that IDA monthly files may change in the UCM NextCloud Server, most likely by updating observer, location or position metadata.
273
+
274
+ To avoid the lengthy computations, the pipeline always download the files (unless instructed not to do so) and compare an MD5 sum of these files against stored MD5 sums of previous downloads. For each file, if they match, there is no change and we skip the lengthy computation.
275
+
276
+ ### Managing Position.
277
+
278
+ The pipeline will stop if it detects that there is not known `Position` during the Sun & Moon data computation. If you happen to know an approximated photometer Position with enough accuracy for your purpose, you may enter it in the database.
279
+
280
+ ### Entering new position
281
+
282
+ 1. Enter new cordinates in the database
283
+
284
+ ```bash
285
+ tess-ida-db --console coords add --name stars4 --latitude 40.5 --longitude -3.1 --height 650
286
+ ```
287
+
288
+ 2. Then, re-run the pipeline with the `--fix` flag
289
+
290
+ ```bash
291
+ (.venv) jupyter$ tess-ida-pipe --console range -n stars4 -s 2024-03 -u 2024-06 -i IDA -o ECSV --fix
292
+ ```
293
+
294
+ ### Listing positions
295
+
296
+ TBD
297
+
298
+ ### Modifing position
299
+
300
+ 1. Modify coordinates in the database
301
+
302
+ You may modify any or all coordinates.
303
+
304
+ ```bash
305
+ tess-ida-db --console coords update --name stars4 --longitude -3.15
306
+ tess-ida-db --console coords update --name stars4 --latitude 40.8 --height 690
307
+ ```
308
+
309
+ 2. Delete ***all related ECSV files !***
310
+
311
+ ```bash
312
+ rm -fr ECSV/stars4/*.ecsv
313
+ ```
314
+
315
+ 3. Then, re-run the pipeline with the `--fix` flag
316
+
317
+ ```bash
318
+ (.venv) jupyter$ tess-ida-pipe --console range -n stars4 -s 2024-03 -u 2024-06 -i IDA -o ECSV --fix
319
+ ```
320
+
321
+
322
+ ### Deleting position
323
+
324
+ You probably want this once you know that the IDA monthly files incorporate Position metadata in the header
325
+
326
+
327
+ 1. Delete coordinates from the database
328
+
329
+ ```bash
330
+ tess-ida-db --console coords delete --name stars4
331
+ ```
332
+
333
+ 2. Delete ***all related ECSV files !***
334
+
335
+ ```bash
336
+ rm -fr ECSV/stars4/*.ecsv
337
+ ```
338
+
339
+ 3. Then, re-run the pipeline ***without*** the `--fix` flag
340
+
341
+ ```bash
342
+ (.venv) jupyter$ tess-ida-pipe --console range -n stars4 -s 2024-03 -u 2024-06 -i IDA -o ECSV
343
+ ```