tart-cargo 0.1.8__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.
@@ -0,0 +1,127 @@
1
+ Metadata-Version: 2.3
2
+ Name: tart_cargo
3
+ Version: 0.1.8
4
+ Summary: Curated cargo of TART radio astronomy packages for stimela 2.0
5
+ License: MIT
6
+ Author: Tim Molteno
7
+ Author-email: tim@elec.ac.nz
8
+ Requires-Python: <4.0,>=3.8
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.8
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Requires-Dist: requests (>=2.0,<3.0)
18
+ Requires-Dist: stimela (>=2.0.1.1,<3.0.0.0)
19
+ Description-Content-Type: text/markdown
20
+
21
+ # tart_cargo
22
+
23
+ Curated cargo of TART radio astronomy packages for stimela 2.0. This allows the use of TART telescope tools as part of the [stimela 2.0](https://github.com/caracal-pipeline/stimela/) radio astronomy pipeline.
24
+
25
+ Author: Tim Molteno
26
+
27
+ Based on the [tart_tools](https://github.com/tart-telescope/tools) package which does most of the heavy lifting.
28
+
29
+ ## Installation and Use
30
+
31
+ Start with a suitable Linux machine, with apptainer installed.
32
+
33
+ then create a python virtual environment
34
+
35
+ python3 -m venv myvenv
36
+ source myvenv/bin/activate
37
+ pip install tart_cargo
38
+
39
+ This should install all the necessary dependencies (including stimela).
40
+
41
+ Then create a stimela recipe. An example is shown below...
42
+
43
+ ```
44
+ #!/usr/bin/env -S stimela run -l
45
+ # This basic TART Stimela 2.0 processing pipeline
46
+ opts:
47
+ log:
48
+ dir: logs/log-{config.run.datetime}
49
+ name: log-{info.fqname}
50
+ nest: 2
51
+ symlink: log
52
+
53
+ _include:
54
+ - (tartcargo):
55
+ - tart2ms.yml
56
+ - tart-download-data.yml
57
+ - disko.yml
58
+ - disko-draw.yml
59
+
60
+ tart-image:
61
+ info: TART imaging using stimela
62
+
63
+ inputs:
64
+ tart:
65
+ dtype: str
66
+ required: true
67
+ info: "TART name (e.g. mu-udm)"
68
+
69
+ outputs:
70
+ ms:
71
+ dtype: MS
72
+ default: '{current.tart}.ms'
73
+ hdf:
74
+ dtype: File
75
+ default: =STRIPEXT(current.ms) + '-vis.hdf'
76
+ svg:
77
+ dtype: File
78
+ default: =STRIPEXT(current.ms) + '.svg'
79
+
80
+ assign:
81
+ api: 'https://api.elec.ac.nz/tart/{recipe.tart}'
82
+
83
+
84
+ steps:
85
+
86
+ download-hdf:
87
+ cab: tart-download-data
88
+ params:
89
+ api: =recipe.api
90
+ vis: true
91
+ file: =recipe.hdf
92
+
93
+ create-ms:
94
+ cab: tart2ms
95
+ params:
96
+ hdf: =steps.download-hdf.file
97
+ ms: =recipe.ms
98
+ clobber: true
99
+ single-field: true
100
+ rephase: obs-midpoint
101
+
102
+ disko-image:
103
+ cab: disko
104
+ params:
105
+ ms: =recipe.ms
106
+ HDF: '{recipe.tart}.h5'
107
+ healpix: true
108
+ fov: 170deg
109
+ res: 0.5deg
110
+ lasso: true
111
+ alpha: 0.006
112
+ l1-ratio: 0.02
113
+
114
+ project-image:
115
+ cab: disko-draw
116
+ params:
117
+ hdf: '{recipe.tart}.h5'
118
+ show-sources: true
119
+ SVG: =recipe.svg
120
+ ```
121
+
122
+ You can run this recipe as follows:
123
+
124
+ stimela run example_recipe.yml tart=mu-udm
125
+
126
+ This will download data, and form an image from the specified TART telescope.
127
+
@@ -0,0 +1,106 @@
1
+ # tart_cargo
2
+
3
+ Curated cargo of TART radio astronomy packages for stimela 2.0. This allows the use of TART telescope tools as part of the [stimela 2.0](https://github.com/caracal-pipeline/stimela/) radio astronomy pipeline.
4
+
5
+ Author: Tim Molteno
6
+
7
+ Based on the [tart_tools](https://github.com/tart-telescope/tools) package which does most of the heavy lifting.
8
+
9
+ ## Installation and Use
10
+
11
+ Start with a suitable Linux machine, with apptainer installed.
12
+
13
+ then create a python virtual environment
14
+
15
+ python3 -m venv myvenv
16
+ source myvenv/bin/activate
17
+ pip install tart_cargo
18
+
19
+ This should install all the necessary dependencies (including stimela).
20
+
21
+ Then create a stimela recipe. An example is shown below...
22
+
23
+ ```
24
+ #!/usr/bin/env -S stimela run -l
25
+ # This basic TART Stimela 2.0 processing pipeline
26
+ opts:
27
+ log:
28
+ dir: logs/log-{config.run.datetime}
29
+ name: log-{info.fqname}
30
+ nest: 2
31
+ symlink: log
32
+
33
+ _include:
34
+ - (tartcargo):
35
+ - tart2ms.yml
36
+ - tart-download-data.yml
37
+ - disko.yml
38
+ - disko-draw.yml
39
+
40
+ tart-image:
41
+ info: TART imaging using stimela
42
+
43
+ inputs:
44
+ tart:
45
+ dtype: str
46
+ required: true
47
+ info: "TART name (e.g. mu-udm)"
48
+
49
+ outputs:
50
+ ms:
51
+ dtype: MS
52
+ default: '{current.tart}.ms'
53
+ hdf:
54
+ dtype: File
55
+ default: =STRIPEXT(current.ms) + '-vis.hdf'
56
+ svg:
57
+ dtype: File
58
+ default: =STRIPEXT(current.ms) + '.svg'
59
+
60
+ assign:
61
+ api: 'https://api.elec.ac.nz/tart/{recipe.tart}'
62
+
63
+
64
+ steps:
65
+
66
+ download-hdf:
67
+ cab: tart-download-data
68
+ params:
69
+ api: =recipe.api
70
+ vis: true
71
+ file: =recipe.hdf
72
+
73
+ create-ms:
74
+ cab: tart2ms
75
+ params:
76
+ hdf: =steps.download-hdf.file
77
+ ms: =recipe.ms
78
+ clobber: true
79
+ single-field: true
80
+ rephase: obs-midpoint
81
+
82
+ disko-image:
83
+ cab: disko
84
+ params:
85
+ ms: =recipe.ms
86
+ HDF: '{recipe.tart}.h5'
87
+ healpix: true
88
+ fov: 170deg
89
+ res: 0.5deg
90
+ lasso: true
91
+ alpha: 0.006
92
+ l1-ratio: 0.02
93
+
94
+ project-image:
95
+ cab: disko-draw
96
+ params:
97
+ hdf: '{recipe.tart}.h5'
98
+ show-sources: true
99
+ SVG: =recipe.svg
100
+ ```
101
+
102
+ You can run this recipe as follows:
103
+
104
+ stimela run example_recipe.yml tart=mu-udm
105
+
106
+ This will download data, and form an image from the specified TART telescope.
@@ -0,0 +1,30 @@
1
+ [project]
2
+ name = "tart_cargo"
3
+ version = "0.1.8"
4
+ description = "Curated cargo of TART radio astronomy packages for stimela 2.0"
5
+ authors = [
6
+ {name = "Tim Molteno",email = "tim@elec.ac.nz"}
7
+ ]
8
+ license = {text = "MIT"}
9
+ readme = "README.md"
10
+ requires-python = "<4.0,>=3.8"
11
+
12
+ # [tool.setuptools]
13
+ # packages = [{include = "tartcargo"}]
14
+ #
15
+ # [tool.setuptools.package-dir]
16
+ # tartcargo = "tartcargo"
17
+
18
+ [tool.poetry.dependencies]
19
+ stimela = "^2.0.1.1"
20
+ requests = "^2.0"
21
+
22
+ [tool.poetry]
23
+ packages = [{include = "tartcargo"}]
24
+
25
+
26
+ [tool.poetry.group.dev.dependencies]
27
+
28
+ [build-system]
29
+ requires = ["poetry-core>=2.0.0,<3.0.0"]
30
+ build-backend = "poetry.core.masonry.api"
File without changes
@@ -0,0 +1,47 @@
1
+ # Draw and visualize discrete fields of view
2
+ #
3
+ # positional arguments:
4
+ # filename The HDF5 field of view file
5
+ #
6
+ # options:
7
+ # -h, --help show this help message and exit
8
+ # --catalog CATALOG Catalog API URL. (default: https://tart.elec.ac.nz/catalog)
9
+ # --show-sources Show known sources on images (only works on PNG & SVG). (default: False)
10
+ # --elevation ELEVATION
11
+ # Elevation limit for displaying sources (degrees). (default: 20.0)
12
+ # --min MIN Lower end of image range (-1 means calculate) (default: -1)
13
+ # --max MAX Upper end of image range. (-1 means calculate) (default: -1)
14
+ # --PNG PNG Generate a PNG format image. (default: None)
15
+ # --PDF PDF Generate a PDF format image. (default: None)
16
+ # --SVG SVG Generate a SVG format image. (default: None)
17
+ # --VTK VTK Generate a VTK mesh format image. (default: None)
18
+ # --FITS FITS Generate a FITS format image. (default: None)
19
+ # --sqrt Scale pixels to the square root (default: False)
20
+ # --display Display the field of view (default: False)
21
+ # --version Display the current version (default: False)
22
+ # --debug Display debugging information (default: False)
23
+ _include:
24
+ - genesis/tart-cargo-base.yml
25
+
26
+ cabs:
27
+ disko-draw:
28
+ name: disko-draw
29
+ image:
30
+ _use: vars.tart-cargo.images
31
+ name: tools
32
+ command: disko_draw
33
+ info: Create a 2D projection of an HDF disko image.
34
+ inputs:
35
+ hdf:
36
+ dtype: File
37
+ required: true
38
+ info: The disko HDF output file
39
+ policies:
40
+ positional: true
41
+ show-sources:
42
+ dtype: bool
43
+ default: false
44
+ info: "Display the known sources in the field"
45
+ SVG:
46
+ dtype: str
47
+ info: "The name of the SVG output file"
@@ -0,0 +1,58 @@
1
+ _include:
2
+ - genesis/tart-cargo-base.yml
3
+
4
+ cabs:
5
+ disko:
6
+ name: disko
7
+ image:
8
+ _use: vars.tart-cargo.images
9
+ name: tools
10
+ command: disko
11
+ info: Image the radio sky using discrete operator techniques.
12
+
13
+ inputs:
14
+ ms:
15
+ dtype: MS
16
+ required: true
17
+ info: The measurement set
18
+ nvis:
19
+ dtype: int
20
+ default: 1000
21
+ info: Number of visibilities to use. Memory use is proportional to this.
22
+ channel:
23
+ dtype: int
24
+ default: 0
25
+ info: The frequency channel to use.
26
+ field:
27
+ dtype: int
28
+ default: 0
29
+ info: The field to use.
30
+ lasso:
31
+ dtype: bool
32
+ default: false
33
+ info: "Use L1/L2 regularization, controlled by alpha, l1-ratio parameters"
34
+ alpha:
35
+ dtype: float
36
+ default: 0.02
37
+ info: "The L1 regularization parameter"
38
+ l1-ratio:
39
+ dtype: float
40
+ default: 0.05
41
+ info: "The lasso L1/L2-ratio parameter"
42
+ HDF:
43
+ dtype: str
44
+ required: true
45
+ info: The spherical image file (.hdf5) format
46
+ healpix:
47
+ dtype: bool
48
+ default: true
49
+ fov:
50
+ dtype: str
51
+ required: true
52
+ info: The field of view use a suffix (deg, arcmin, arcsec)
53
+ res:
54
+ dtype: str
55
+ required: true
56
+ info: The resolution per pixel use a suffix (deg, arcmin, arcsec)
57
+
58
+
File without changes
@@ -0,0 +1,5 @@
1
+ vars:
2
+ tart-cargo:
3
+ images:
4
+ registry: ghcr.io/tart-telescope
5
+ version: v0.9b9
@@ -0,0 +1,100 @@
1
+ # usage: spotless [-h] [--fov FOV] [--res RES] [--mesh] [--adaptive ADAPTIVE]
2
+ # [--res-min RES_MIN] [--healpix] [--nside NSIDE] [--api API]
3
+ # [--catalog CATALOG] [--file FILE | --ms MS | --vis VIS] [--nvis NVIS]
4
+ # [--channel CHANNEL] [--field FIELD] [--ddid DDID] [--dir DIR] [--multimodel]
5
+ # [--beam] [--display] [--fits] [--PNG] [--HDF HDF] [--PDF] [--SVG]
6
+ # [--show-sources] [--elevation ELEVATION] [--title TITLE] [--version]
7
+ # [--debug] [--show-model]
8
+ #
9
+ # Generate a SPOTLESS using the web api of a TART radio telescope.
10
+ #
11
+ # options:
12
+ # -h, --help show this help message and exit
13
+ # --fov FOV Field of view. E.g. 1.3deg, 12", 11', 8uas, 6mas... (default: 180deg)
14
+ # --res RES Maximim Resolution of the sky. E.g. 1.3deg, 12", 11', 8uas, 6mas.
15
+ # (default: 2deg)
16
+ # --mesh Use a non-structured mesh in the image space (default: False)
17
+ # --adaptive ADAPTIVE Use N cycles of adaptive meshing (default: 0)
18
+ # --res-min RES_MIN Highest allowed res of the sky. E.g. 1.3deg, 12", 11', 8uas, 6mas.
19
+ # (default: None)
20
+ # --healpix Use HealPix tiling (default: False)
21
+ # --nside NSIDE Healpix nside parameter for display purposes only. (default: None)
22
+ # --api API Telescope API server URL. (default: https://tart.elec.ac.nz/signal)
23
+ # --catalog CATALOG Catalog API URL. (default: https://tart.elec.ac.nz/catalog)
24
+ # --file FILE Snapshot observation saved JSON file (visiblities, positions and
25
+ # more). (default: None)
26
+ # --ms MS visibility file (default: None)
27
+ # --vis VIS Use a local JSON file containing the visibilities to create the
28
+ # image. (default: None)
29
+ # --nvis NVIS Number of visibilities to use. (default: 1000)
30
+ # --channel CHANNEL Use this frequency channel. (default: 0)
31
+ # --field FIELD Use this FIELD_ID from the measurement set. (default: 0)
32
+ # --ddid DDID Use this DDID from the measurement set. (default: 0)
33
+ # --dir DIR Output directory. (default: .)
34
+ # --multimodel Use the SPOTLESS algorithm with multi-dimensional model. (default:
35
+ # False)
36
+ # --beam Generate a gridless beam. (default: False)
37
+ # --display Display Image to the user (default: False)
38
+ # --fits Generate a FITS format image (default: False)
39
+ # --PNG Generate a PNG format image (default: False)
40
+ # --HDF HDF Generate an HDF format representation of the field of view (default:
41
+ # None)
42
+ # --PDF Generate a PDF format image (default: False)
43
+ # --SVG Generate a SVG format image (default: False)
44
+ # --show-sources Show known sources on images (only works on PNG). (default: False)
45
+ # --elevation ELEVATION
46
+ # Elevation limit for displaying sources (degrees) (default: 20.0)
47
+ # --title TITLE Prefix the output files. (default: spotless)
48
+ # --version Display the current version (default: False)
49
+ # --debug Display debugging information (default: False)
50
+ # --show-model Show the location of the model sources. (default: False)
51
+
52
+ _include:
53
+ - genesis/tart-cargo-base.yml
54
+
55
+ cabs:
56
+ disko:
57
+ name: spotless
58
+ image:
59
+ _use: vars.tart-cargo.images
60
+ name: tools
61
+ command: spotless
62
+ info: Image the radio sky using model-fitting.
63
+
64
+ inputs:
65
+ ms:
66
+ dtype: MS
67
+ required: true
68
+ info: The measurement set
69
+ HDF:
70
+ dtype: str
71
+ required: true
72
+ info: The spherical image file (.hdf5) format
73
+ nvis:
74
+ dtype: int
75
+ default: 1000
76
+ info: Number of visibilities to use. Memory use is proportional to this.
77
+ channel:
78
+ dtype: int
79
+ default: 0
80
+ info: The frequency channel to use.
81
+ field:
82
+ dtype: int
83
+ default: 0
84
+ info: The field to use.
85
+ healpix:
86
+ dtype: bool
87
+ default: true
88
+ fov:
89
+ dtype: str
90
+ required: true
91
+ info: The field of view use a suffix (deg, arcmin, arcsec)
92
+ res:
93
+ dtype: str
94
+ required: true
95
+ info: The resolution per pixel use a suffix (deg, arcmin, arcsec)
96
+ multimodel:
97
+ dtype: bool
98
+ default: false
99
+ info: Use a sky model that increases in number of parameters as new sources are added.
100
+
@@ -0,0 +1,6 @@
1
+ _include: (.)genesis/tart-cargo-base.yml
2
+
3
+ images:
4
+ default-tart:
5
+ _use: vars.tart-cargo.images
6
+ name: tools
@@ -0,0 +1,30 @@
1
+ _include:
2
+ - genesis/tart-cargo-base.yml
3
+
4
+ cabs:
5
+ tart-download-data:
6
+ image:
7
+ _use: vars.tart-cargo.images
8
+ name: tools
9
+ command: tart_download_data
10
+ info: Download data from a TART telescope
11
+ inputs:
12
+ api:
13
+ dtype: str
14
+ required: true
15
+ info: The API url for the TART. Usually something like https://api.elec.ac.nz/tart/mu-udm
16
+ n:
17
+ dtype: int
18
+ required: false
19
+ default: 1
20
+ raw:
21
+ dtype: bool
22
+ default: false
23
+ vis:
24
+ dtype: bool
25
+ default: false
26
+ file:
27
+ dtype: str
28
+ default: false
29
+ info: Set the name of the output file
30
+
@@ -0,0 +1,33 @@
1
+ _include:
2
+ - genesis/tart-cargo-base.yml
3
+
4
+ cabs:
5
+ tart2ms:
6
+ name: tart2ms
7
+ image:
8
+ _use: vars.tart-cargo.images
9
+ name: tools
10
+ command: tart2ms
11
+ info: Create measurement sets from TART data
12
+
13
+ inputs:
14
+ hdf:
15
+ dtype: File
16
+ required: true
17
+ must_exist: true
18
+ info: An HDF file downloaded from the TART telescope
19
+ single-field:
20
+ dtype: bool
21
+ default: false
22
+ info: Combine measurement sets into a single field
23
+ rephase:
24
+ choices: [obs-midpoint, sun]
25
+ clobber:
26
+ dtype: bool
27
+ default: false
28
+ info: overwrite the measurement set if it exists
29
+ ms:
30
+ dtype: str
31
+ required: true
32
+ info: The name of the measurement set
33
+