Skip to content

Commit

Permalink
removed flip_chi
Browse files Browse the repository at this point in the history
  • Loading branch information
achael committed Mar 20, 2024
1 parent 4f9fc12 commit f8714cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 42 deletions.
19 changes: 0 additions & 19 deletions ehtim/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,25 +740,6 @@ def switch_polrep(self, polrep_out='stokes', pol_prim_out=None):

return newim

def flip_chi(self):
"""Flip between the different conventions for measuring the EVPA (E of N vs N of E).
Args:
Returns:
(Image): image with flipped EVPA
"""

im = self.copy()
if im.polrep == 'stokes':
im.qvec *= -1

elif im.polrep == 'circ':
im.lrvec = -np.conjugate(im.lrvec)
im.rlvec = -np.conjugate(im.rlvec)

return im

def orth_chi(self):
"""Rotate the EVPA 90 degrees
Expand Down
27 changes: 4 additions & 23 deletions ehtim/movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,25 +708,6 @@ def switch_polrep(self, polrep_out='stokes', pol_prim_out=None):

return newmov

def flip_chi(self):
"""Flip between the different conventions for measuring the EVPA (E of N vs N of E).
Args:
Returns:
(Image): movie with flipped EVPA
"""

mov = self.copy()
if mov.polrep == 'stokes':
mov.qframes *= [-qvec for qvec in mov.qframes]

elif mov.polrep == 'circ':
mov.lrframes *= [-np.conjugate(lrvec) for lrvec in mov.lrframes]
mov.rlframes *= [-np.conjugate(rlvec) for rlvec in mov.rlframes]

return mov

def orth_chi(self):
"""Rotate the EVPA 90 degrees
Expand All @@ -737,11 +718,11 @@ def orth_chi(self):
"""
mov = self.copy()
if mov.polrep == 'stokes':
mov.qframes *= [-uvec for uvec in mov.vframes]

mov.qframes *= -1
mov.uframes *= -1
elif mov.polrep == 'circ':
mov.lrframes *= [np.conjugate(lrvec) for lrvec in mov.lrframes]
mov.rlframes *= [np.conjugate(rlvec) for rlvec in mov.rlframes]
mov.lrframes *= -1
mov.rlframes *= -1

return mov

Expand Down

0 comments on commit f8714cc

Please sign in to comment.