solarmonitor / solarmonitoridl

4 stars 7 forks source link

SWAP saves data in $HOME #30

Closed dpshelio closed 8 years ago

dpshelio commented 10 years ago

Originally reported by: David PS (Bitbucket: dvdgc, GitHub: Unknown)


The downloaded SWAP files are filling the $home directory instead to use the temporary one as with the other instruments


dpshelio commented 10 years ago

Original comment by David PS (Bitbucket: dvdgc, GitHub: Unknown):


Closed by pull request #18

dpshelio commented 10 years ago

Original comment by David PS (Bitbucket: dvdgc, GitHub: Unknown):


pull request #18 closes this issue.

dpshelio commented 10 years ago

Original comment by David PS (Bitbucket: dvdgc, GitHub: Unknown):


Hi @ecarley, have you seen my pull request #18 ? I've solved that problem without using the swap objects, and @pohuigin proposed a way to do it... but it is not on his hands any more but an American Dan at ROB.

In any case, if you want to improve it using objects in the right way, you are more than welcome :) but the PR I did has been working in South Africa for almost a month.

dpshelio commented 10 years ago

Original comment by Eoin Carley (Bitbucket: ecarley, GitHub: Unknown):


Thanks, Shaun. I will run this just to see if it downloads raw data to the directory specified in set_p2sw. But as you suspect, it may just be a location for prepped data

I'll let you know....

dpshelio commented 10 years ago

Original comment by Shaun Bloomfield (Bitbucket: s_bloomfield, GitHub: Unknown):


I don't think that it would affect the data download directory, but the output directory for FITS files that can be optionally written out by p2sw_prep.pro (which all of the data in the SWAP object is passed through) defaults to the current working directory. This can be altered by setting /OUTFITS and OUTDIR=... in one of the SWAP object methods:

#!idl
ss = obj_new( 'swap' )
ss -> set_p2sw, outdir='/any/place/you/like/', /outfits

This would mean the appropriately prepped SWAP file can be pointed to the correct location, but possibly (probably) still leaves an issue with a SWAP file being initially copied to the current working directory (by the object socket transfer).

dpshelio commented 10 years ago

Original comment by Eoin Carley (Bitbucket: ecarley, GitHub: Unknown):


Hi David,

I'm currently looking into this and trying to find a command for the swap object that allows you to specify a location for the download. The following documentation does not say anything (unless I missed it): http://proba2.oma.be/SSW/proba2/swap/doc/SWAP_basic_tutorial.pdf

Are you aware of such a command? If not, we could spawn a bash command to move the file e.g., $ spawn, 'mv ' + filename + ' '+temp_path

....however, I would prefer to keep the data write and save inside IDL.

What do you think?