Adam Adam (6/3/2014)

scratch pad for building the tests. This should not be used for anything but a random space to dump synpets of code.


------------------------------
import PynPoint
from PynPoint import pynplot

ws_dir = '/Users/adamamara/Work/Active_Projects/PynPoint_paper/data/baselinerun_paper/workspace__shirley_stk100'
ws = PynPoint.workflow.restore(ws_dir)
res = ws.get('residuals_module3')

pynplot.plt_res(res,20)




------------------------------

import PynPoint_v1_5 as PynPoint
fileconfig = '/Users/amaraa/Work/Active_Projects/PynPoint_v1_5/test/test_data/PynPoint_test_v001.config'
ws = PynPoint.workflow.run(fileconfig,force_replace=True)

#ws.save('/Users/amaraa/Work/Active_Projects/PynPoint_v1_5/test/test_data/workspace_temp')

ws_restore = PynPoint.workflow.restore('/Users/amaraa/Work/Active_Projects/PynPoint_v1_5/test/test_data/workspace_temp/')




------------------------------
import h5py
file = '/Users/amaraa/Work/Active_Projects/PynPoint_v1_5/test/test_data/workspace_temp/ctx_info/ctx_basic.hdf5'
fhdf = h5py.File(file)
entries = fhdf.get('entries')


------------------------------

import PynPoint_v1_5 as PynPoint

test_data = '/Users/amaraa/Work/Active_Projects/PynPoint_v1_5/test/test_data/'

files_fits = [test_data+'Cube_000_Frame_0002_zoom_2.0.fits_shift.fits_planet.fits',
        test_data+'Cube_001_Frame_0130_zoom_2.0.fits_shift.fits_planet.fits',
        test_data+'Cube_000_Frame_0166_zoom_2.0.fits_shift.fits_planet.fits',
        test_data+'Cube_003_Frame_0160_zoom_2.0.fits_shift.fits_planet.fits']

imagesfits = PynPoint.images.create_wfitsfiles(files_fits,
                    cent_remove=True,resize=False,ran_sub=False,recent=False)
                    

images3 = PynPoint.images.create_wdir(test_data,
            cent_remove=False,resize=False,ran_sub=False,recent=False)



--------------------------------


import PynPoint_v1_5 as PynPoint

test_data = '/Users/amaraa/Work/Active_Projects/PynPoint_v1_5/test/test_data/'

basis3 = PynPoint.basis.create_wdir(test_data,
            cent_remove=False,resize=False,ran_sub=False,recent=False)

images3 = PynPoint.images.create_wdir(test_data,
            cent_remove=False,resize=False,ran_sub=False,recent=False)

res3 = PynPoint.residuals.create_winstances(images3,basis3)




--------------------------------
import PynPoint_v1_5 as PynPoint

test_data = '/Users/amaraa/Work/Active_Projects/PynPoint_v1_5/test/test_data/'
temp_file = test_data +'temp2del.hdf5'

basis3 = PynPoint.basis.create_wdir(test_data,
            cent_remove=False,resize=False,ran_sub=False,recent=False)

#basis1_save = basis1.mk_basis_set()
basis3.save(temp_file)
basis_restore = PynPoint.basis.create_restore(temp_file)






-------------------
import h5py
import PynPoint_v1_5 as PynPoint

test_data = '/Users/amaraa/Work/Active_Projects/PynPoint_v1_5/test/test_data/'

file_hdf = test_data+'testfile_basis_temp.hdf5'

basis3 = PynPoint.basis(test_data,intype='dir',cent_remove=True,resize=False,ran_sub=False,recent=False)
basis_empty = PynPoint.basis(None,intype='empty')
basis3.save(file=file_hdf)

basis_restore = PynPoint.basis(file_hdf,intype='restore')

fbasis = h5py.File(file_hdf,'r')


—————————————
import h5py
import PynPoint_v1_5 as PynPoint

test_data = '/Users/amaraa/Work/Active_Projects/PynPoint_v1_5/test/test_data/'

file_hdf = test_data+'testfile_images_temp.hdf5'

images3 = PynPoint.images(test_data,intype='dir',cent_remove=True,resize=False,ran_sub=False,recent=False)
images3.save(file=file_hdf)

images3_restore = PynPoint.images(file_hdf,intype='restore')

—————————————
import h5py
import PynPoint_v1_5 as PynPoint

test_data = '/Users/amaraa/Work/Active_Projects/PynPoint_v1_5/test/test_data/'

file_images_restore = test_data+'testfile_images.hdf5'
file_basis_restore = test_data+'testfile_basis.hdf5'

basis_restore = PynPoint.basis(file_basis_restore,intype='restore')
images_restore = PynPoint.images(file_images_restore,intype='restore')
res = PynPoint.residuals(images_restore,basis_restore,3)





