ifu
Deprecated utilities for spectrally dispersed IFU NRM data.
clean_data(list_file, isz=256, r1=100, dr=10, edge=0, bad_map=None, add_bad=None, offx=0, offy=0, clip_fact=0.5, apod=True, sky=True, window=None, f_kernel=3, verbose=False, ihdu=0, display=False)
Clean IFU files and reshape their frames into a four-dimensional cube.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
list_file
|
list of str or path-like
|
IFU FITS files. |
required |
isz
|
int
|
Crop size. |
256
|
r1
|
int
|
Sky-ring parameters. |
100, 10
|
dr
|
int
|
Sky-ring parameters. |
100, 10
|
edge
|
int
|
Detector-edge width to remove. |
0
|
bad_map
|
ndarray or None
|
Bad-pixel map. |
None
|
add_bad
|
list or None
|
Additional bad-pixel coordinates. |
None
|
offx
|
int
|
Crop-center offsets. |
0
|
offy
|
int
|
Crop-center offsets. |
0
|
clip_fact
|
float
|
Relative sigma threshold for frame selection. |
0.5
|
apod
|
bool
|
Whether to apodize and sky-subtract frames. |
True
|
sky
|
bool
|
Whether to apodize and sky-subtract frames. |
True
|
window
|
float or None
|
Apodization width. |
None
|
f_kernel
|
int or None
|
Median-filter kernel size for centering. |
3
|
verbose
|
bool
|
Whether to print progress. |
False
|
ihdu
|
int
|
FITS HDU containing the data. |
0
|
display
|
bool
|
Whether to display cleaning parameters. |
False
|
Returns:
| Type | Description |
|---|---|
ndarray
|
Cube with shape (ndit, nlambda, isz, isz). |
Source code in src/amical/ifu.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
get_lambda(i_wl=None, filtname='YH', instrument='SPHERE-IFS')
Display and return wavelengths for the selected IFU channels.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
i_wl
|
int or list of int or None
|
One channel, a two-index channel range, or all channels. |
None
|
filtname
|
str
|
IFU filter name. |
"YH"
|
instrument
|
str
|
Instrument name. |
"SPHERE-IFS"
|
Returns:
| Type | Description |
|---|---|
float, numpy.ndarray, or None
|
Selected wavelength values in micrometres, or None when unavailable. |
Source code in src/amical/ifu.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | |