In [1]:
import subprocess

In [1]:
results_name = "HITS1"
gpu_code_path = "../code/gpu/"
real_image_path = "../../fraser/chip_0/"#gpu_code_path+"images/"+real_image_name #
psi_image_path = gpu_code_path+"output-images/psi"
phi_image_path = gpu_code_path+"output-images/phi"

In [35]:
paramsFile = open('../code/gpu/debug/parameters.config', 'w')
paramsFile.write(
"""Debug ................ : 1
PSF Sigma ............ : 1.0
Mask Threshold ....... : 0.75
Mask Penalty ......... : -0.05
Angles to Search ..... : 120
Minimum Angle ........ : 0.0
Maximum Angle ........ : 6.283
Velocities to Search . : 90
Minimum Velocity ..... : 24.
Maximum Velocity ..... : 600.
Psi/Phi to file ...... : 1
Source Images Path ... : ../../{source}/
Psi Images Path ...... : ../../{psi}/
Phi Images Path....... : ../../{phi}/
Results Path ......... : ../../../data/results/{name}.txt
""".format( source=real_image_path, psi=psi_image_path, phi=phi_image_path, name=results_name ))
paramsFile.close()

In [36]:
!cd ~/cuda-workspace/kbmod/code/gpu/debug/; ./clearImages.sh


rm: cannot remove '../output-images/psi/*.fits': No such file or directory
rm: cannot remove '../output-images/phi/*.fits': No such file or directory

In [37]:
!cd ~/cuda-workspace/kbmod/code/gpu/debug/; ./CudaTracker


PSF Sigma ............  : 1.0
Mask Threshold .......  : 0.75
Mask Penalty .........  : -0.05
Angles to Search .....  : 120
Minimum Angle ........  : 0.0
Maximum Angle ........  : 6.283
Velocities to Search .  : 90
Minimum Velocity .....  : 24.
Maximum Velocity .....  : 600.
Psi/Phi to file ......  : 1
Source Images Path ...  : ../../../../HITS/trimmed_chip_03/Blind15A_02/search_nights//
Psi Images Path ......  : ../../../code/gpu/output-images/psi/
Phi Images Path.......  : ../../../code/gpu/output-images/phi/
Results Path .........  : ../../../data/results/HITS1.txt
Using Kernel Size 5X5
| 0.004 | 0.015 | 0.023 | 0.015 | 0.004 | 
 ---------------------------------------
| 0.015 | 0.058 | 0.093 | 0.058 | 0.015 | 
 ---------------------------------------
| 0.023 | 0.093 | 0.147 | 0.093 | 0.023 | 
 ---------------------------------------
| 0.015 | 0.058 | 0.093 | 0.058 | 0.015 | 
 ---------------------------------------
| 0.004 | 0.015 | 0.023 | 0.015 | 0.004 | 
 ---------------------------------------
97.532% of PSF contained within kernel
Reading 4 images from ../../../../HITS/trimmed_chip_03/Blind15A_02/search_nights//

Image times: 0.000 0.068 0.153 0.222 
Masking images ... Done.
Creating Psi and Phi ... Done. Took 146.374 ms per image
Creating interleaved psi/phi buffer ... Done.
Searching 10800 possible trajectories starting from 7836660 pixels... 
 1. Likelihood: 35.315 at x: 102, y: 2713  and velocity x: -242.455, y: 196.366 Est. Flux: 7068.809
 2. Likelihood: 34.227 at x: 102, y: 2718  and velocity x: -242.045, y: 175.883 Est. Flux: 6647.873
 3. Likelihood: 34.146 at x: 102, y: 2722  and velocity x: -240.183, y: 156.003 Est. Flux: 6617.490
 4. Likelihood: 30.881 at x: 103, y: 2717  and velocity x: -247.222, y: 179.645 Est. Flux: 5374.923
 5. Likelihood: 30.417 at x: 101, y: 2714  and velocity x: -237.482, y: 192.338 Est. Flux: 5276.734
 6. Likelihood: 30.102 at x: 103, y: 2721  and velocity x: -245.551, y: 159.489 Est. Flux: 5150.433
 7. Likelihood: 30.034 at x: 102, y: 2712  and velocity x: -247.429, y: 200.394 Est. Flux: 5936.115
 8. Likelihood: 29.865 at x: 101, y: 2709  and velocity x: -236.602, y: 213.068 Est. Flux: 5081.178
 9. Likelihood: 29.727 at x: 101, y: 2718  and velocity x: -236.867, y: 172.121 Est. Flux: 5034.704
10. Likelihood: 29.063 at x: 103, y: 2712  and velocity x: -247.429, y: 200.394 Est. Flux: 4772.388
11. Likelihood: 29.017 at x: 102, y: 2717  and velocity x: -247.222, y: 179.645 Est. Flux: 5568.885
12. Likelihood: 28.433 at x: 103, y: 2725  and velocity x: -248.019, y: 143.219 Est. Flux: 4524.144
13. Likelihood: 28.326 at x: 102, y: 2714  and velocity x: -242.455, y: 196.366 Est. Flux: 5043.941
14. Likelihood: 27.448 at x: 102, y: 2708  and velocity x: -241.358, y: 217.351 Est. Flux: 4254.002
15. Likelihood: 27.275 at x: 101, y: 2723  and velocity x: -234.816, y: 152.517 Est. Flux: 4238.092
Took 80.166 seconds to complete search.
Writing images to file... Done.

In [13]:
#subprocess.check_output(['ls','-a']) #all that is technically needed...
#print subprocess.check_output(['~/cuda-workspace/kbmod/code/gpu/debug/clearImages.sh;'])