Skip to content

Commit

Permalink
Update and rename EMEWS_example.py to BEMEWS_example.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jpkneller authored Jul 1, 2024
1 parent b8fb458 commit 1aeb7b4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions EMEWS_example.py → BEMEWS_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@
SNaltaz = Betelgeuse.transform_to(AltAz(obstime=time,location=SuperK))

# load the mdule that does the Earth-matter effect calculation
import EMEWS
import EMEWS.data
import BEMEWS
import BEMEWS.data

# class to accumulate input data for calcultion
ID = EMEWS.InputDataEMEWS()
ID = BEMEWS.InputDataEMEWS()

# assign data fields
ID.altitude = SNaltaz.alt.deg
ID.azimuth = SNaltaz.az.deg

ID.outputfilenamestem = "out/EMEWS:PREM"

ID.densityprofile = str(files(EMEWS.data).joinpath("PREM.rho.dat"))
ID.electronfraction = str(files(EMEWS.data).joinpath("PREM.Ye.dat"))
ID.densityprofile = str(files(BEMEWS.data).joinpath("PREM.rho.dat"))
ID.electronfraction = str(files(BEMEWS.data).joinpath("PREM.Ye.dat"))

ID.NE = 296
ID.Emin = 1
Expand All @@ -51,7 +51,7 @@

ID.accuracy = 1.01E-009

# if set to True the EMEWS module will output files in the 'out' directory
# if set to True the BEMEWS module will output files in the 'out' directory
# The stepcounterlimit controls how often output is written. The larger the number, the less often it happens.
ID.outputflag = False
ID.stepcounterlimit = 1
Expand All @@ -60,7 +60,7 @@

# do the calculation. The return is a four dimensional array of transition probabilities nu_alpha -> nu_i:
# index order is matter/antimatter, energy, i, alpha
Pfm = EMEWS.Run(ID)
Pfm = BEMEWS.Run(ID)

print("finished")

0 comments on commit 1aeb7b4

Please sign in to comment.