Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
shouryakhanna authored Nov 18, 2024
1 parent 19dec99 commit 975a233
Show file tree
Hide file tree
Showing 2 changed files with 1,027 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/notebooks/RedClumpGaiaAllWISE/rcdemo/autil.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

exec(open("./rcdemo/packages_to_import.py").read())



def xyz2lbr(x,y,z):
# dtor=np.pi/180.0
rc2=x*x+y*y
return [np.degrees(np.arctan2(y,x)),np.degrees(np.arctan(z/np.sqrt(rc2))),np.sqrt(rc2+z*z)]




def dist2dmod(d):
"""
Arguments:
d (float)- distance in kpc
"""
return 5.0*np.log10(100.0*d)

def dmod2dist(dmod):
"""
Arguments:
dmod (float)- distance modulus
"""
return np.power(10.0,dmod/5.0-2.0)

Loading

0 comments on commit 975a233

Please sign in to comment.