You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a virtual environment for development, if you are using bash:
23
40
24
-
```
41
+
```bash
25
42
python3 -m venv venv
26
43
source venv/bin/activate
27
44
pip install -e .[dev,ci]
@@ -31,10 +48,89 @@ To exit the virtual environment use `deactivate`.
31
48
32
49
This project used the black auto formatter which can be run on git commit along with flake8 if you install pre-commit. To do this run the following in your terminal from within your virtual environment.
33
50
34
-
```
51
+
```bash
35
52
pre-commit install
36
53
```
37
54
38
55
Now pre-commit hooks should run on `git commit`.
39
56
40
-
The run the test suite use `pytest`.
57
+
To run the test suite use `pytest`.
58
+
59
+
## Quickstart
60
+
The package currently support `.FITS` type images. To perform source finding you can import the `finder` module:
61
+
62
+
```python
63
+
from continunet.finder import Finder
64
+
```
65
+
66
+
Load your image file:
67
+
68
+
```python
69
+
finder = Finder("<filepath>")
70
+
```
71
+
72
+
To produce a source catalogue and populate the `Finder` instance:
73
+
74
+
```python
75
+
sources = finder.find()
76
+
```
77
+
78
+
If you want to calculate the model map and residuals image as part of source finding, use the `Finder.find()` method with `generate_maps=True`:
79
+
80
+
```python
81
+
sources = finder.find(generate_maps=True)
82
+
model_map = finder.model_map
83
+
residuals = finder.residuals
84
+
```
85
+
86
+
Alternatively, manually calculate model map and residual images using:
87
+
88
+
```python
89
+
model_map = finder.get_model_map()
90
+
residuals = finder.get_residuals()
91
+
```
92
+
93
+
Useful available attributes of the `Finder` object are:
94
+
```python
95
+
finder.sources # cleaned source catalogue
96
+
finder.reconstructed_image # predicted image reconstructed by unet module
|`x_location_original`| x coordinate of the source from the cutout used for inference |
114
+
|`y_location_original`| y coordinate of the source from the cutout used for inference |
115
+
|`orientation`| orientation of source ellipse in radians |
116
+
|`major_axis`| major axis of source ellipse |
117
+
|`minor_axis`| minor axis of source ellipse |
118
+
|`flux_density_uncorrected`| total intensity of the segmented source region before beam corrections applied |
119
+
|`label`| class label in predicted segmentation map |
120
+
|`x_location`| x coordinate of the source in the original input image dimensions |
121
+
|`y_location`| y coordinate of the source in the original input image dimensions |
122
+
|`right_ascension`| RA coordinate of the source in the original input image dimensions |
123
+
|`declination`| Dec coordinate of the source in the original input image dimensions |
124
+
|`area`| area of source ellipse |
125
+
|`position_angle`| position angle of source ellipse in degrees |
126
+
|`correction_factor`| correction factor applied to flux density measurement to account for undersampling of synthesised beam |
127
+
|`flux_density`| corrected flux density |
128
+
129
+
## Development
130
+
ContinUNet is subject to ongoing development. To see the backlog of features and bug fixes please go to the [project board](https://github.com/users/hstewart93/projects/4/views/1). Please raise any feature requests or bugs as [issues](https://github.com/hstewart93/continunet/issues).
131
+
132
+
The following features will be added in the next release:
133
+
134
+
1. Exporting processed images to `.npy` and `.FTIS`[(#33)](https://github.com/hstewart93/continunet/issues/33)
135
+
2. Inference for non-square images [(#27)](https://github.com/hstewart93/continunet/issues/27)
136
+
3. Taking cutout of `ImageSquare` object before inference [(#28)](https://github.com/hstewart93/continunet/issues/28)
0 commit comments