Source Detection

Troubleshooting Source Detection Code

I have been working on uniting all three of my photometry codes all morning. By saving the output of each program and loading that output at the beginning of the next program, the programs can be more compartmentalized. It took me a fair amount of time to figure out the best format even for just storing the mean median and std from the background detecting code, eventually I discovered how to make it work with savetxt paired with loadtxt in the next program.

The source detection program was more difficult since the output is a large table and terminal truncates its output. Trying to convert straight to a numpy array from the table was problematic since it automatically made it a one dimensional array where I wanted a two dimensional array. I managed to figure out how to get tables into a better form with an astropy help page. I used pandas to turn the table into a pandas dataframe. The dataframe then is easily converted into a numpy array (which I am most familiar with working with). From there, I can save the numpy array as a txt file to then be loaded in the next program with a loadtxt command. This method is nice because it preserves all of the data that daostarfinder outputs and does not truncate the data.

Next Steps

I plan to continue making the source finding code more robust with better annotation about the functioning of the DAOStarFinder routine and a display of the image with the sources mapped with circles. Once that is done, then I can move on to the most important task of making a functioning aperture photometry code. Once all three pieces of the puzzle are there, then I will try using different images and parameters to gain facility with photutils even further.

Concluding

I took a few extra hours to do this stuff this afternoon and pushed off painting. It’s nice to have this flexibility and I feel I may continue to use the flexibility of the paint job to spend a few days a week getting extra research in during the afternoon and painting less. Stay tuned for a more complete week-long summary and reflection coming later tonight.

Written on July 6, 2018