Skip to content

Commit

Permalink
Update RTModel.py
Browse files Browse the repository at this point in the history
  • Loading branch information
valboz authored Jul 18, 2024
1 parent d1cb883 commit c66d61c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions RTModel/RTModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def config_InitCond(self, npeaks = 2, peakthreshold = 10.0, oldmodels = 4, overr
self.InitCond_oldmodels = oldmodels # Maximum number of old models to include in new run as initial conditions
self.InitCond_override = override # Override peak identification and manually set peak times
self.InitCond_nostatic = nostatic or onlyorbital # No static models will be calculated.
self.InitCond_noparallax = onlyorbital; # Only orbital motion models will be calculated.
self.InitCond_onlyorbital = onlyorbital; # Only orbital motion models will be calculated.
self.InitCond_usesatellite = usesatellite; # Satellite to be used for initial conditions. Ground telescopes by default.

def InitCond(self):
Expand All @@ -99,8 +99,8 @@ def InitCond(self):
f.write('usesatellite = ' + str(self.InitCond_usesatellite) + '\n')
if(self.InitCond_nostatic):
f.write('nostatic = 1\n')
if(self.InitCond_noparallax):
f.write('noparallax = 1\n')
if(self.InitCond_onlyorbital):
f.write('onlyorbital = 1\n')
if(self.InitCond_override != None):
f.write('override = ' + str(self.InitCond_override[0])+ ' ' + str(self.InitCond_override[1]) + '\n')
print('- Launching: InitCond')
Expand Down Expand Up @@ -316,7 +316,7 @@ def recover_options(self,run = None):
with open(pathname + '/' + self.inidir + '/InitCond.ini','r') as f:
lines = f.readlines()
self.InitCond_nostatic = False
self.InitCond_noparallax = False
self.InitCond_onlyorbital = False
self.InitCond_override = None
for line in lines:
chunks = line.split()
Expand All @@ -330,8 +330,8 @@ def recover_options(self,run = None):
self.InitCond_usesatellite = int(chunks[2])
elif(chunks[0]=='nostatic'):
self.InitCond_nostatic = (int(chunks[2])!=0)
elif(chunks[0]=='noparallax'):
self.InitCond_noparallax = (int(chunks[2])!=0)
elif(chunks[0]=='onlyorbital'):
self.InitCond_onlyorbital = (int(chunks[2])!=0)
elif(chunks[0]=='override'):
self.InitCond_override = (float(chunks[2]),float(chunks[3]))
with open(pathname + '/' + self.inidir + '/LevMar.ini','r') as f:
Expand Down

0 comments on commit c66d61c

Please sign in to comment.