plotastrodata 1.7.3__tar.gz → 1.7.4__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.7.3 → plotastrodata-1.7.4}/PKG-INFO +1 -1
  2. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata/__init__.py +1 -1
  3. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata/analysis_utils.py +9 -3
  4. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata.egg-info/PKG-INFO +1 -1
  5. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/LICENSE +0 -0
  6. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/README.md +0 -0
  7. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata/const_utils.py +0 -0
  8. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata/coord_utils.py +0 -0
  9. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata/ext_utils.py +0 -0
  10. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata/fft_utils.py +0 -0
  11. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata/fits_utils.py +0 -0
  12. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata/fitting_utils.py +0 -0
  13. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata/los_utils.py +0 -0
  14. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata/matrix_utils.py +0 -0
  15. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata/other_utils.py +0 -0
  16. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata/plot_utils.py +0 -0
  17. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata.egg-info/SOURCES.txt +0 -0
  18. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata.egg-info/dependency_links.txt +0 -0
  19. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata.egg-info/not-zip-safe +0 -0
  20. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata.egg-info/requires.txt +0 -0
  21. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/plotastrodata.egg-info/top_level.txt +0 -0
  22. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/setup.cfg +0 -0
  23. {plotastrodata-1.7.3 → plotastrodata-1.7.4}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plotastrodata
3
- Version: 1.7.3
3
+ Version: 1.7.4
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', FutureWarning)
4
- __version__ = '1.7.3'
4
+ __version__ = '1.7.4'
@@ -534,9 +534,15 @@ class AstroData():
534
534
  fhd = self.fitsheader
535
535
  h = {}
536
536
  nocent = self.pv or self.center is None
537
- cx, cy = (0, 0) if nocent else coord2xy(self.center)
537
+ ci = np.argmin(np.abs(self.x))
538
+ cj = np.argmin(np.abs(self.y))
539
+ if nocent:
540
+ cx, cy = 0, 0
541
+ else:
542
+ xy = [self.x[ci] / 3600, self.y[cj] / 3600]
543
+ cx, cy = coord2xy(xy2coord(xy, self.center))
538
544
  h['NAXIS1'] = len(self.x)
539
- h['CRPIX1'] = np.argmin(np.abs(self.x)) + 1
545
+ h['CRPIX1'] = ci + 1
540
546
  h['CRVAL1'] = cx
541
547
  h['CDELT1'] = self.dx
542
548
  if fhd is None or 'CUNIT1' not in fhd or isdeg(fhd['CUNIT1']):
@@ -550,7 +556,7 @@ class AstroData():
550
556
  h[f'CDELT{vaxis}'] = -self.dv / cu.c_kms * self.restfreq
551
557
  if not self.pv:
552
558
  h['NAXIS2'] = len(self.y)
553
- h['CRPIX2'] = np.argmin(np.abs(self.y)) + 1
559
+ h['CRPIX2'] = cj + 1
554
560
  h['CRVAL2'] = cy
555
561
  h['CDELT2'] = self.dy
556
562
  if fhd is None or 'CUNIT2' not in fhd or isdeg(fhd['CUNIT2']):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plotastrodata
3
- Version: 1.7.3
3
+ Version: 1.7.4
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