-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
19dec99
commit 975a233
Showing
2 changed files
with
1,027 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|
Oops, something went wrong.