Skip to content

Commit

Permalink
different frame and frameorg
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukeaso-astron committed Jan 10, 2025
1 parent f9d3a1f commit 4831603
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plotastrodata/other_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ def coord2xy(coords: str | list, coordorg: str = '00h00m00s 00d00m00s',
frameorg = frame
if frame is None and frameorg is None:
frame = frameorg = 'icrs'
if frame != frameorg:
frame = frameorg
print('Different frame and frameorg are not supported by coord2xy yet.',
frameorg, 'is used.')
clist = SkyCoord(coords, frame=frame)
c0 = SkyCoord(coordorg, frame=frameorg)
xy = c0.spherical_offsets_to(clist)
Expand Down
3 changes: 3 additions & 0 deletions plotastrodata/plot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,9 @@ def set_axis_radec(self, center: str | None = None,
center = self.center
if center is None:
center = '00h00m00s 00d00m00s'
if len(csplit := center.split()) == 3:
center = f'{csplit[1]} {csplit[2]}'
print(center)
dec = np.radians(coord2xy(center)[1])

def get_sec(x, i):
Expand Down

0 comments on commit 4831603

Please sign in to comment.