plotastrodata 1.9.17__tar.gz → 1.9.19__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.
- {plotastrodata-1.9.17/plotastrodata.egg-info → plotastrodata-1.9.19}/PKG-INFO +1 -1
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata/__init__.py +1 -1
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata/analysis_utils.py +4 -3
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata/fits_utils.py +1 -1
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata/plot_utils.py +25 -12
- {plotastrodata-1.9.17 → plotastrodata-1.9.19/plotastrodata.egg-info}/PKG-INFO +1 -1
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/LICENSE +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/MANIFEST.in +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/README.md +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata/const_utils.py +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata/coord_utils.py +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata/ext_utils.py +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata/fft_utils.py +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata/fitting_utils.py +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata/los_utils.py +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata/matrix_utils.py +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata/noise_utils.py +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata/other_utils.py +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata.egg-info/SOURCES.txt +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata.egg-info/dependency_links.txt +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata.egg-info/not-zip-safe +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata.egg-info/requires.txt +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/plotastrodata.egg-info/top_level.txt +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/setup.cfg +0 -0
- {plotastrodata-1.9.17 → plotastrodata-1.9.19}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plotastrodata
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.19
|
|
4
4
|
Summary: plotastrodata is a tool for astronomers to create figures from FITS files and perform fundamental data analyses with ease.
|
|
5
5
|
Home-page: https://github.com/yusukeaso-astron/plotastrodata
|
|
6
6
|
Download-URL: https://github.com/yusukeaso-astron/plotastrodata
|
|
@@ -817,11 +817,11 @@ class AstroFrame():
|
|
|
817
817
|
beam_incut = 1 / np.hypot(np.cos(angle) / bmaj, np.sin(angle) / bmin)
|
|
818
818
|
d.beam[i] = np.array([np.abs(d.dv), beam_incut, 0])
|
|
819
819
|
|
|
820
|
-
def _read_one(self, d: AstroData, i: int) -> None:
|
|
820
|
+
def _read_one(self, d: AstroData, i: int, grid: list) -> None:
|
|
821
821
|
if d.center[i] == 'common':
|
|
822
822
|
d.center[i] = self.center
|
|
823
823
|
d.sigma_org[i] = d.sigma[i]
|
|
824
|
-
grid = self._read_fitsimage(d, i, grid=
|
|
824
|
+
grid = self._read_fitsimage(d, i, grid=grid)
|
|
825
825
|
if d.data[i] is not None:
|
|
826
826
|
d.sigma[i] = estimate_rms(d.data[i], d.sigma[i])
|
|
827
827
|
grid = self._shift_center(d, i, grid)
|
|
@@ -854,7 +854,8 @@ class AstroFrame():
|
|
|
854
854
|
for name in ASTRODATA_ARGS:
|
|
855
855
|
setattr(d, name, _as_list(getattr(d, name), d.n))
|
|
856
856
|
d.beam = _as_list(d.beam, d.n, isbeam=True)
|
|
857
|
+
grid = [d.x, d.y, d.v]
|
|
857
858
|
for i in range(d.n):
|
|
858
|
-
self._read_one(d, i)
|
|
859
|
+
self._read_one(d, i, grid.copy())
|
|
859
860
|
for name in ASTRODATA_ARGS + ['beam']:
|
|
860
861
|
setattr(d, name, _scalar_if_single(getattr(d, name), d.n))
|
|
@@ -344,14 +344,14 @@ class PlotAxes2D():
|
|
|
344
344
|
Args:
|
|
345
345
|
samexy (bool, optional): True supports same ticks between x and y. Defaults to True.
|
|
346
346
|
loglog (float, optional): If a float is given, plot on a log-log plane, and xim=(xmax / loglog, xmax) and so does ylim. Defaults to None.
|
|
347
|
-
xscale (str, optional): Defaults to
|
|
348
|
-
yscale (str, optional): Defaults to
|
|
347
|
+
xscale (str, optional): ``'log'`` labels decade ticks and ticks near the limits; other intermediate ticks are minor and unlabeled. Defaults to ``'linear'``.
|
|
348
|
+
yscale (str, optional): ``'log'`` labels decade ticks and ticks near the limits; other intermediate ticks are minor and unlabeled. Defaults to ``'linear'``.
|
|
349
349
|
xlim (list, optional): Defaults to None.
|
|
350
350
|
ylim (list, optional): Defaults to None.
|
|
351
351
|
xlabel (str, optional): Defaults to None.
|
|
352
352
|
ylabel (str, optional): Defaults to None.
|
|
353
|
-
xticks (list, optional): Defaults to None.
|
|
354
|
-
yticks (list, optional): Defaults to None.
|
|
353
|
+
xticks (list, optional): Explicit major ticks, overriding the default locator. Defaults to None.
|
|
354
|
+
yticks (list, optional): Explicit major ticks, overriding the default locator. Defaults to None.
|
|
355
355
|
xticklabels (list, optional): Defaults to None.
|
|
356
356
|
yticklabels (list, optional): Defaults to None.
|
|
357
357
|
xticksminor (list or int, optional): If int, int times more than xticks. Defaults to None.
|
|
@@ -393,16 +393,25 @@ class PlotAxes2D():
|
|
|
393
393
|
def _init_ticks(self, axis: str) -> None:
|
|
394
394
|
ax = self.ax
|
|
395
395
|
ticks_attr = f'{axis}ticks'
|
|
396
|
-
ticklabels_attr = f'{axis}ticklabels'
|
|
397
396
|
scale = getattr(self, f'{axis}scale')
|
|
398
|
-
lim = getattr(self, f'{axis}lim')
|
|
399
397
|
ticks = getattr(self, ticks_attr)
|
|
400
398
|
if ticks is None:
|
|
401
|
-
ticks = getattr(ax, f'get_{axis}ticks')()
|
|
402
399
|
if scale == 'log':
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
400
|
+
axis_obj = getattr(ax, f'{axis}axis')
|
|
401
|
+
lim = getattr(self, f'{axis}lim')
|
|
402
|
+
if lim is None:
|
|
403
|
+
lim = axis_obj.get_view_interval()
|
|
404
|
+
lim = np.sort(lim)
|
|
405
|
+
major_ticks = mpl.ticker.LogLocator(base=10).tick_values(*lim)
|
|
406
|
+
major_ticks, major_labels = logticks(major_ticks, lim)
|
|
407
|
+
axis_obj.set_ticks(major_ticks)
|
|
408
|
+
axis_obj.set_ticklabels(major_labels)
|
|
409
|
+
ll = mpl.ticker.LogLocator(base=10, subs=np.arange(2.0, 10.0))
|
|
410
|
+
axis_obj.set_minor_locator(ll)
|
|
411
|
+
axis_obj.set_minor_formatter(mpl.ticker.NullFormatter())
|
|
412
|
+
else:
|
|
413
|
+
ticks = getattr(ax, f'get_{axis}ticks')()
|
|
414
|
+
setattr(self, ticks_attr, ticks)
|
|
406
415
|
|
|
407
416
|
def _make_ticks(self, ticks: np.ndarray, ticksminor: int) -> np.ndarray:
|
|
408
417
|
dt = ticks[1] - ticks[0]
|
|
@@ -414,11 +423,15 @@ class PlotAxes2D():
|
|
|
414
423
|
ax = self.ax
|
|
415
424
|
attr = f'{axis}ticks'
|
|
416
425
|
ticks = getattr(self, attr)
|
|
417
|
-
|
|
426
|
+
if ticks is not None:
|
|
427
|
+
getattr(ax, f'set_{attr}')(ticks)
|
|
418
428
|
ticksminor = getattr(self, f'{attr}minor')
|
|
419
429
|
if ticksminor is not None:
|
|
420
430
|
if isinstance(ticksminor, int):
|
|
421
|
-
|
|
431
|
+
if ticks is None:
|
|
432
|
+
ticks = getattr(ax, f'get_{axis}ticks')()
|
|
433
|
+
major_ticks = (ticks)
|
|
434
|
+
ticksminor = self._make_ticks(major_ticks, ticksminor)
|
|
422
435
|
getattr(ax, f'set_{attr}')(ticksminor, minor=True)
|
|
423
436
|
|
|
424
437
|
def _apply_if_not_none(self, axis: str, attr: str) -> None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plotastrodata
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.19
|
|
4
4
|
Summary: plotastrodata is a tool for astronomers to create figures from FITS files and perform fundamental data analyses with ease.
|
|
5
5
|
Home-page: https://github.com/yusukeaso-astron/plotastrodata
|
|
6
6
|
Download-URL: https://github.com/yusukeaso-astron/plotastrodata
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|