trivial modification

This commit is contained in:
Chunxiao Li 2021-06-09 15:18:38 +08:00 committed by GitHub
parent 746959a99f
commit e079601ea4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,8 +37,8 @@ def download_sw_jb2008(direc=None):
if not path.exists(direc): makedirs(direc)
if not path.exists(swfile1):
desc1 = 'Downloading the space weather data {:s} from Space Environment Technologies(SET)'.format('SOLFSMY.TXT')
desc2 = 'Downloading the space weather data {:s} from Space Environment Technologies(SET)'.format('DTCFILE.TXT')
desc1 = "Downloading the space weather data '{:s}' from Space Environment Technologies(SET)".format('SOLFSMY.TXT')
desc2 = "Downloading the space weather data '{:s}' from Space Environment Technologies(SET)".format('DTCFILE.TXT')
tqdm_request(url1,direc,'SOLFSMY.TXT',desc1)
tqdm_request(url2,direc,'DTCFILE.TXT',desc2)
else:
@ -46,12 +46,12 @@ def download_sw_jb2008(direc=None):
if datetime.now() > modified_time + timedelta(days=1):
remove(swfile1)
remove(swfile2)
desc1 = 'Updating the space weather data {:s} from Space Environment Technologies(SET)'.format('SOLFSMY.TXT')
desc2 = 'Updating the space weather data {:s} from Space Environment Technologies(SET)'.format('DTCFILE.TXT')
desc1 = "Updating the space weather data '{:s}' from Space Environment Technologies(SET)".format('SOLFSMY.TXT')
desc2 = "Updating the space weather data '{:s}' from Space Environment Technologies(SET)".format('DTCFILE.TXT')
tqdm_request(url1,direc,'SOLFSMY.TXT',desc1)
tqdm_request(url2,direc,'DTCFILE.TXT',desc2)
else:
print('The space weather data {0:s} and {1:s} in {2:s} is already the latest.'.format('SOLFSMY.TXT','DTCFILE.TXT',direc))
print("The space weather data '{0:s}' and '{1:s}' in {2:s} is already the latest.".format('SOLFSMY.TXT','DTCFILE.TXT',direc))
return [swfile1,swfile2]
def read_sw_jb2008(swfile):
@ -128,4 +128,4 @@ def get_sw(sw_data,t_mjd):
y = sw_data2[j:j+2].flatten()
DTCVAL = np.interp(t_dmjd,x,y)
return F10,F10B,S10,S10B,M10,M10B,Y10,Y10B,DTCVAL
return F10,F10B,S10,S10B,M10,M10B,Y10,Y10B,DTCVAL