plotastrodata 1.10.0__tar.gz → 1.10.1__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 (25) hide show
  1. {plotastrodata-1.10.0/plotastrodata.egg-info → plotastrodata-1.10.1}/PKG-INFO +1 -1
  2. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata/__init__.py +1 -1
  3. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata/analysis_utils.py +9 -2
  4. {plotastrodata-1.10.0 → plotastrodata-1.10.1/plotastrodata.egg-info}/PKG-INFO +1 -1
  5. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/LICENSE +0 -0
  6. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/MANIFEST.in +0 -0
  7. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/README.md +0 -0
  8. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata/const_utils.py +0 -0
  9. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata/coord_utils.py +0 -0
  10. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata/ext_utils.py +0 -0
  11. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata/fft_utils.py +0 -0
  12. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata/fits_utils.py +0 -0
  13. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata/fitting_utils.py +0 -0
  14. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata/los_utils.py +0 -0
  15. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata/matrix_utils.py +0 -0
  16. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata/noise_utils.py +0 -0
  17. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata/other_utils.py +0 -0
  18. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata/plot_utils.py +0 -0
  19. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata.egg-info/SOURCES.txt +0 -0
  20. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata.egg-info/dependency_links.txt +0 -0
  21. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata.egg-info/not-zip-safe +0 -0
  22. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata.egg-info/requires.txt +0 -0
  23. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/plotastrodata.egg-info/top_level.txt +0 -0
  24. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/setup.cfg +0 -0
  25. {plotastrodata-1.10.0 → plotastrodata-1.10.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plotastrodata
3
- Version: 1.10.0
3
+ Version: 1.10.1
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.10.0'
4
+ __version__ = '1.10.1'
@@ -692,12 +692,12 @@ class AstroFrame():
692
692
  if self.fitsimage is not None and self.center is None:
693
693
  self.center = FitsData(self.fitsimage).get_center()
694
694
 
695
- def pos2xy(self, poslist: list[str | list[float, float]] = []
695
+ def pos2xy(self, poslist: list[str | list[float, float]]
696
696
  ) -> np.ndarray:
697
697
  """Text or relative to absolute coordinates.
698
698
 
699
699
  Args:
700
- poslist (list, optional): Text coordinates or relative coordinates. Defaults to [].
700
+ poslist (list): Text coordinates or relative coordinates.
701
701
 
702
702
  Returns:
703
703
  np.ndarray: absolute coordinates.
@@ -705,6 +705,13 @@ class AstroFrame():
705
705
  onexy = np.shape(poslist) == (2,) and not isinstance(poslist[0], str)
706
706
  if np.shape(poslist) == () or onexy:
707
707
  poslist = [poslist]
708
+ if self.center is None and any(isinstance(p, str) for p in poslist):
709
+ clsname = type(self).__name__
710
+ raise ValueError(
711
+ f'{clsname}.pos2xy() requires "center" when poslist '
712
+ 'contains sky-coordinate strings. Set "center" explicitly '
713
+ 'or "fitsimage" from which the center can be determined.'
714
+ )
708
715
  x, y = [None] * len(poslist), [None] * len(poslist)
709
716
  for i, p in enumerate(poslist):
710
717
  if isinstance(p, str):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plotastrodata
3
- Version: 1.10.0
3
+ Version: 1.10.1
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