@@ -27,19 +27,19 @@ def central_pixel_coordinates(self):
2727 def origin (self ):
2828 return self .mask .origin
2929
30- def pixel_coordinates_from_arcsec_coordinates (self , arcsec_coordinates ):
30+ def pixel_coordinates_from_scaled_coordinates (self , scaled_coordinates ):
3131 return (
3232 int (
3333 (
34- (- arcsec_coordinates [0 ] + self .mask .origin [0 ])
34+ (- scaled_coordinates [0 ] + self .mask .origin [0 ])
3535 / self .mask .pixel_scales [0 ]
3636 )
3737 + self .central_pixel_coordinates [0 ]
3838 + 0.5
3939 ),
4040 int (
4141 (
42- (arcsec_coordinates [1 ] - self .mask .origin [1 ])
42+ (scaled_coordinates [1 ] - self .mask .origin [1 ])
4343 / self .mask .pixel_scales [1 ]
4444 )
4545 + self .central_pixel_coordinates [1 ]
@@ -53,46 +53,46 @@ def mask_centre(self):
5353 return grid_util .grid_centre_from_grid_1d (grid_1d = self .masked_grid )
5454
5555 @property
56- def shape_2d_arcsec (self ):
56+ def shape_2d_scaled (self ):
5757 return (
5858 float (self .mask .pixel_scales [0 ] * self .mask .shape [0 ]),
5959 float (self .mask .pixel_scales [1 ] * self .mask .shape [1 ]),
6060 )
6161
6262 @property
63- def arc_second_maxima (self ):
63+ def scaled_maxima (self ):
6464 return (
65- (self .shape_2d_arcsec [0 ] / 2.0 ) + self .mask .origin [0 ],
66- (self .shape_2d_arcsec [1 ] / 2.0 ) + self .mask .origin [1 ],
65+ (self .shape_2d_scaled [0 ] / 2.0 ) + self .mask .origin [0 ],
66+ (self .shape_2d_scaled [1 ] / 2.0 ) + self .mask .origin [1 ],
6767 )
6868
6969 @property
70- def arc_second_minima (self ):
70+ def scaled_minima (self ):
7171 return (
72- (- (self .shape_2d_arcsec [0 ] / 2.0 )) + self .mask .origin [0 ],
73- (- (self .shape_2d_arcsec [1 ] / 2.0 )) + self .mask .origin [1 ],
72+ (- (self .shape_2d_scaled [0 ] / 2.0 )) + self .mask .origin [0 ],
73+ (- (self .shape_2d_scaled [1 ] / 2.0 )) + self .mask .origin [1 ],
7474 )
7575
7676 @property
7777 def extent (self ):
7878 return np .asarray (
7979 [
80- self .arc_second_minima [1 ],
81- self .arc_second_maxima [1 ],
82- self .arc_second_minima [0 ],
83- self .arc_second_maxima [0 ],
80+ self .scaled_minima [1 ],
81+ self .scaled_maxima [1 ],
82+ self .scaled_minima [0 ],
83+ self .scaled_maxima [0 ],
8484 ]
8585 )
8686
8787 @property
8888 def yticks (self ):
8989 """Compute the yticks labels of this grid, used for plotting the y-axis ticks when visualizing an image-grid"""
90- return np .linspace (self .arc_second_minima [0 ], self .arc_second_maxima [0 ], 4 )
90+ return np .linspace (self .scaled_minima [0 ], self .scaled_maxima [0 ], 4 )
9191
9292 @property
9393 def xticks (self ):
9494 """Compute the xticks labels of this grid, used for plotting the x-axis ticks when visualizing an image-grid"""
95- return np .linspace (self .arc_second_minima [1 ], self .arc_second_maxima [1 ], 4 )
95+ return np .linspace (self .scaled_minima [1 ], self .scaled_maxima [1 ], 4 )
9696
9797 @property
9898 def unmasked_grid (self ):
@@ -143,7 +143,7 @@ def border_grid(self):
143143 grid_1d = border_grid_1d
144144 )
145145
146- def grid_pixels_from_grid_arcsec (self , grid_arcsec_1d ):
146+ def grid_pixels_from_grid_scaled_1d (self , grid_scaled_1d ):
147147 """Convert a grid of (y,x) arc second coordinates to a grid of (y,x) pixel values. Pixel coordinates are \
148148 returned as floats such that they include the decimal offset from each pixel's top-left corner.
149149
@@ -155,18 +155,18 @@ def grid_pixels_from_grid_arcsec(self, grid_arcsec_1d):
155155
156156 Parameters
157157 ----------
158- grid_arcsec_1d : ndarray
158+ grid_scaled_1d : ndarray
159159 A grid of (y,x) coordinates in arc seconds.
160160 """
161- grid_pixels_1d = grid_util .grid_pixels_1d_from_grid_arcsec_1d_shape_2d_and_pixel_scales (
162- grid_arcsec_1d = grid_arcsec_1d ,
161+ grid_pixels_1d = grid_util .grid_pixels_1d_from_grid_scaled_1d_shape_2d_and_pixel_scales (
162+ grid_scaled_1d = grid_scaled_1d ,
163163 shape_2d = self .mask .shape ,
164164 pixel_scales = self .mask .pixel_scales ,
165165 origin = self .mask .origin ,
166166 )
167167 return self .mask .mapping .grid_from_grid_1d (grid_1d = grid_pixels_1d )
168168
169- def grid_pixel_centres_from_grid_arcsec_1d (self , grid_arcsec_1d ):
169+ def grid_pixel_centres_from_grid_scaled_1d (self , grid_scaled_1d ):
170170 """Convert a grid of (y,x) arc second coordinates to a grid of (y,x) pixel values. Pixel coordinates are \
171171 returned as integers such that they map directly to the pixel they are contained within.
172172
@@ -178,11 +178,11 @@ def grid_pixel_centres_from_grid_arcsec_1d(self, grid_arcsec_1d):
178178
179179 Parameters
180180 ----------
181- grid_arcsec_1d : ndarray
181+ grid_scaled_1d : ndarray
182182 The grid of (y,x) coordinates in arc seconds.
183183 """
184- grid_pixel_centres_1d = grid_util .grid_pixel_centres_1d_from_grid_arcsec_1d_shape_2d_and_pixel_scales (
185- grid_arcsec_1d = grid_arcsec_1d ,
184+ grid_pixel_centres_1d = grid_util .grid_pixel_centres_1d_from_grid_scaled_1d_shape_2d_and_pixel_scales (
185+ grid_scaled_1d = grid_scaled_1d ,
186186 shape_2d = self .mask .shape ,
187187 pixel_scales = self .mask .pixel_scales ,
188188 origin = self .mask .origin ,
@@ -191,7 +191,7 @@ def grid_pixel_centres_from_grid_arcsec_1d(self, grid_arcsec_1d):
191191 )
192192 return self .mask .mapping .grid_from_grid_1d (grid_1d = grid_pixel_centres_1d )
193193
194- def grid_pixel_indexes_from_grid_arcsec_1d (self , grid_arcsec_1d ):
194+ def grid_pixel_indexes_from_grid_scaled_1d (self , grid_scaled_1d ):
195195 """Convert a grid of (y,x) arc second coordinates to a grid of (y,x) pixel 1D indexes. Pixel coordinates are \
196196 returned as integers such that they are the pixel from the top-left of the 2D grid going rights and then \
197197 downwards.
@@ -207,11 +207,11 @@ def grid_pixel_indexes_from_grid_arcsec_1d(self, grid_arcsec_1d):
207207
208208 Parameters
209209 ----------
210- grid_arcsec_1d : ndarray
210+ grid_scaled_1d : ndarray
211211 The grid of (y,x) coordinates in arc seconds.
212212 """
213- grid_pixel_indexes_1d = grid_util .grid_pixel_indexes_1d_from_grid_arcsec_1d_shape_2d_and_pixel_scales (
214- grid_arcsec_1d = grid_arcsec_1d ,
213+ grid_pixel_indexes_1d = grid_util .grid_pixel_indexes_1d_from_grid_scaled_1d_shape_2d_and_pixel_scales (
214+ grid_scaled_1d = grid_scaled_1d ,
215215 shape_2d = self .mask .shape ,
216216 pixel_scales = self .mask .pixel_scales ,
217217 origin = self .mask .origin ,
@@ -220,7 +220,7 @@ def grid_pixel_indexes_from_grid_arcsec_1d(self, grid_arcsec_1d):
220220 )
221221 return self .mask .mapping .grid_from_grid_1d (grid_1d = grid_pixel_indexes_1d )
222222
223- def grid_arcsec_from_grid_pixels_1d (self , grid_pixels_1d ):
223+ def grid_scaled_from_grid_pixels_1d (self , grid_pixels_1d ):
224224 """Convert a grid of (y,x) pixel coordinates to a grid of (y,x) arc second values.
225225
226226 The pixel coordinate origin is at the top left corner of the grid, such that the pixel [0,0] corresponds to \
@@ -234,23 +234,23 @@ def grid_arcsec_from_grid_pixels_1d(self, grid_pixels_1d):
234234 grid_pixels_1d : ndarray
235235 The grid of (y,x) coordinates in pixels.
236236 """
237- grid_arcsec_1d = grid_util .grid_arcsec_1d_from_grid_pixels_1d_shape_2d_and_pixel_scales (
237+ grid_scaled_1d = grid_util .grid_scaled_1d_from_grid_pixels_1d_shape_2d_and_pixel_scales (
238238 grid_pixels_1d = grid_pixels_1d ,
239239 shape_2d = self .mask .shape ,
240240 pixel_scales = self .mask .pixel_scales ,
241241 origin = self .mask .origin ,
242242 )
243- return self .mask .mapping .grid_from_grid_1d (grid_1d = grid_arcsec_1d )
243+ return self .mask .mapping .grid_from_grid_1d (grid_1d = grid_scaled_1d )
244244
245245 @property
246246 def sub_size (self ):
247247 return self .mask .sub_size
248248
249- def grid_arcsec_from_grid_pixels_1d_for_marching_squares (
249+ def grid_scaled_from_grid_pixels_1d_for_marching_squares (
250250 self , grid_pixels_1d , shape_2d
251251 ):
252252
253- grid_arcsec_1d = grid_util .grid_arcsec_1d_from_grid_pixels_1d_shape_2d_and_pixel_scales (
253+ grid_scaled_1d = grid_util .grid_scaled_1d_from_grid_pixels_1d_shape_2d_and_pixel_scales (
254254 grid_pixels_1d = grid_pixels_1d ,
255255 shape_2d = shape_2d ,
256256 pixel_scales = (
@@ -260,10 +260,10 @@ def grid_arcsec_from_grid_pixels_1d_for_marching_squares(
260260 origin = self .mask .origin ,
261261 )
262262
263- grid_arcsec_1d [:, 0 ] -= self .mask .pixel_scales [0 ] / (2.0 * self .mask .sub_size )
264- grid_arcsec_1d [:, 1 ] += self .mask .pixel_scales [1 ] / (2.0 * self .mask .sub_size )
263+ grid_scaled_1d [:, 0 ] -= self .mask .pixel_scales [0 ] / (2.0 * self .mask .sub_size )
264+ grid_scaled_1d [:, 1 ] += self .mask .pixel_scales [1 ] / (2.0 * self .mask .sub_size )
265265
266- return self .mask .mapping .grid_from_grid_1d (grid_1d = grid_arcsec_1d )
266+ return self .mask .mapping .grid_from_grid_1d (grid_1d = grid_scaled_1d )
267267
268268 @property
269269 def masked_sub_grid (self ):
@@ -286,8 +286,8 @@ def sub_border_grid_1d(self):
286286 @property
287287 def _zoom_centre (self ):
288288
289- extraction_grid_1d = self .mask .geometry .grid_pixels_from_grid_arcsec (
290- grid_arcsec_1d = self .masked_grid .in_1d
289+ extraction_grid_1d = self .mask .geometry .grid_pixels_from_grid_scaled_1d (
290+ grid_scaled_1d = self .masked_grid .in_1d
291291 )
292292 y_pixels_max = np .max (extraction_grid_1d [:, 0 ])
293293 y_pixels_min = np .min (extraction_grid_1d [:, 0 ])
@@ -311,7 +311,7 @@ def _zoom_offset_pixels(self):
311311 )
312312
313313 @property
314- def _zoom_offset_arcsec (self ):
314+ def _zoom_offset_scaled (self ):
315315
316316 return (
317317 - self .mask .pixel_scales [0 ] * self ._zoom_offset_pixels [0 ],
0 commit comments