plotastrodata 1.4.15__tar.gz → 1.5.0__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.
Files changed (23) hide show
  1. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/PKG-INFO +1 -1
  2. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata/__init__.py +1 -1
  3. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata/analysis_utils.py +10 -1
  4. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata/plot_utils.py +6 -3
  5. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata.egg-info/PKG-INFO +1 -1
  6. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/LICENSE +0 -0
  7. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/README.md +0 -0
  8. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata/const_utils.py +0 -0
  9. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata/coord_utils.py +0 -0
  10. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata/ext_utils.py +0 -0
  11. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata/fft_utils.py +0 -0
  12. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata/fits_utils.py +0 -0
  13. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata/fitting_utils.py +0 -0
  14. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata/los_utils.py +0 -0
  15. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata/matrix_utils.py +0 -0
  16. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata/other_utils.py +0 -0
  17. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata.egg-info/SOURCES.txt +0 -0
  18. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata.egg-info/dependency_links.txt +0 -0
  19. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata.egg-info/not-zip-safe +0 -0
  20. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata.egg-info/requires.txt +0 -0
  21. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/plotastrodata.egg-info/top_level.txt +0 -0
  22. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/setup.cfg +0 -0
  23. {plotastrodata-1.4.15 → plotastrodata-1.5.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plotastrodata
3
- Version: 1.4.15
3
+ Version: 1.5.0
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
@@ -1,4 +1,4 @@
1
1
  import warnings
2
2
 
3
3
  warnings.simplefilter('ignore', UserWarning)
4
- __version__ = '1.4.15'
4
+ __version__ = '1.5.0'
@@ -652,7 +652,7 @@ class AstroFrame():
652
652
  for i in range(d.n):
653
653
  if d.center[i] == 'common':
654
654
  d.center[i] = self.center
655
- grid = grid0
655
+ grid = grid0.copy()
656
656
  if d.fitsimage[i] is not None:
657
657
  fd = FitsData(d.fitsimage[i])
658
658
  if d.fitsheader[i] is None:
@@ -678,6 +678,15 @@ class AstroFrame():
678
678
  if d.data[i] is not None:
679
679
  d.sigma_org[i] = d.sigma[i]
680
680
  d.sigma[i] = estimate_rms(d.data[i], d.sigma[i])
681
+ diffcent = (not self.pv
682
+ and self.center is not None
683
+ and d.center[i] is not None
684
+ and d.center[i] != self.center)
685
+ if diffcent:
686
+ cx, cy = coord2xy(d.center[i], self.center) * 3600
687
+ grid[0] = grid[0] + cx # Don't use += cx.
688
+ grid[1] = grid[1] + cy # Don't use += cy.
689
+ d.center[i] = self.center
681
690
  d.data[i], grid = trim(data=d.data[i],
682
691
  x=grid[0], y=grid[1], v=grid[2],
683
692
  xlim=self.xlim, ylim=self.ylim,
@@ -415,9 +415,11 @@ class PlotAstroData(AstroFrame):
415
415
  if nchan > 1 or type(channelnumber) is int:
416
416
  fig.subplots_adjust(hspace=0, wspace=0, right=0.87, top=0.87)
417
417
  if ch < nv:
418
- vellabel = v[ch] if channelnumber is None else v[channelnumber]
418
+ chnum = channelnumber
419
+ vellabel = v[ch if chnum is None else chnum]
420
+ vd = f'{veldigit:d}'
419
421
  ax[ch].text(0.9 * self.rmax, 0.7 * self.rmax,
420
- rf'${vellabel:.{veldigit:d}f}$', color='black',
422
+ rf'${vellabel:.{vd}f}$', color='black',
421
423
  backgroundcolor='white', zorder=20)
422
424
  self.fig = None if internalfig else fig
423
425
  self.ax = ax
@@ -1015,6 +1017,7 @@ class PlotAstroData(AstroFrame):
1015
1017
  ticks = (n*g - second + rounded) * factor
1016
1018
  ticksminor = np.linspace(ticks[0], ticks[-1], 6*nticksminor + 1)
1017
1019
  decimals = max(decimals, 0)
1020
+ decimals = f'{decimals:d}'
1018
1021
  if mode == 'ra':
1019
1022
  xy, i = [ticks / 3600., ticks * 0], 0
1020
1023
  else:
@@ -1024,7 +1027,7 @@ class PlotAstroData(AstroFrame):
1024
1027
  tickvalues = np.array([float(_get(t, i)) for t in tickvalues])
1025
1028
  tickvalues = np.divmod(tickvalues + 1e-7, 1)
1026
1029
  tickvalues = (tickvalues[0] % 60, tickvalues[1])
1027
- ticklabels = [f'{int(i):02d}{unit}' + f'{j:.{decimals:d}f}'[2:]
1030
+ ticklabels = [f'{int(i):02d}{unit}' + f'{j:.{decimals}f}'[2:]
1028
1031
  for i, j in zip(*tickvalues)]
1029
1032
  return ticks, ticksminor, ticklabels
1030
1033
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plotastrodata
3
- Version: 1.4.15
3
+ Version: 1.5.0
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