Commit e453ab5a authored by Sergey Anfinogentov's avatar Sergey Anfinogentov

Update of the utilities to acess JSOC

parent 7bd73d1a
......@@ -24,9 +24,5 @@ pro jsoc_download_aia_data,dir,starttime,stoptime,wave,t_ref=t_ref,x=x,y=y,width
print, processing
urls=jsoc_get_urls(query,processing=processing)
wget_urls,urls,dir
cd, current = temp
cd,dir
spawn,'tar -xf JSOC*.tar'
spawn, 'rm -f JSOC*.tar'
cd,temp
end
\ No newline at end of file
......@@ -3,13 +3,13 @@ function jsoc_get_query,ds,starttime,stoptime,wave,segment=segment,processing=pr
t1=strmid(t1,0,19)+'_TAI'
t2= strreplace(strreplace(anytim(stoptime,/cc),'-','.'),'T','_')
t2=strmid(t2,0,19)+'_TAI'
if keyword_set(t_ref) and keyword_set(x) and keyword_set(y) then begin
if keyword_set(t_ref) and (n_elements(x) eq 1) and (n_elements(y) eq 1) then begin
if n_elements(width) ne 1 then width=100
if n_elements(height) ne 1 then height=100
t_ref_= strreplace(strreplace(anytim(t_ref,/cc),'-','.'),'T','_')
t_ref_=strmid(t_ref_,0,19)+'_TAI'
processing="im_patch,"
processing+="t_start="+t1+",t_stop="+t2+",t=0,r=1,c=0,cadence=1.000000s,locunits=arcsec,boxunits=arcsec,t_ref="+$
processing+="t_start="+t1+",t_stop="+t2+",t=0,r=1,c=0,cadence=1.000000s,locunits=arcsec,boxunits=pixel,t_ref="+$
t_ref_+',x='+strcompress(x,/remove)+',y='+strcompress(y,/remove)+',width='+strcompress(width,/remove)+',height='+strcompress(height,/remove)
processing=str_replace(processing,'=','%3d')
endif
......
......@@ -4,7 +4,7 @@ function encode_url,struct
for i=0,n_elements(tags)-1 do vars[i]=tags[i]+'='+sstring(struct.(i))
return,strjoin(vars,'&')
end
Function jsoc_get_urls,query,directory,requestid=requestid,processing=processing
Function jsoc_get_urls,query,directory,requestid=requestid,processing=processing, file_names = file_names
status=['OK immediate data available','processing','queued for processing','large request needs manual confirm', $
'bad recordset','request not formed correctly, bad series, etc.','request old, results requested after data timed out', $
'RequestID not regognized, probably need to repeat in a few seconds']
......@@ -48,5 +48,6 @@ Function jsoc_get_urls,query,directory,requestid=requestid,processing=processing
nf=n_elements(response.data)
links='http://jsoc.stanford.edu'+strreplace(response.dir,'\/','/')+'/'+response.data.filename
directory='http://jsoc.stanford.edu'+strreplace(response.dir,'\/','/')
file_names = response.data.filename
return, 'http://jsoc.stanford.edu'+strreplace(response.dir,'\/','/')+'/'+response.data.filename
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment