STScI-Citizen-Science / MTPipeline

Pipeline to produce CR rejected, astrodrizzled, png's of HST WFPC2 solar system data.
6 stars 1 forks source link

Process ACS and WFC3 images to database #146

Closed walyssonBarbosa closed 10 years ago

walyssonBarbosa commented 10 years ago

Run build_master_images_table.py on acs and wfc3 files.

walyssonBarbosa commented 10 years ago

What png files do I need to use? Only the *_single_sci_linear.png one or I am missing some of them?

ktfhale commented 10 years ago

We care about *wide_single_sci_linear.png and *wide_single_sci_log.png files.

However, we don't care about the *center_single* files at all, but they're still there. If desirable, I could delete them. However, the update-master-finders branch still expects to see them, so that version of the pipeline will reprocess the pngs if I get rid of the center images, and that would be bad. The current version of the master branch does not expect center images, however, so if you're running that, then deleting the center images would be fine.

walyssonBarbosa commented 10 years ago

As I'm only going to work on filling up master_images I think it will not be a problem using update-master-finders because build_master_images_table.py will not make any changes in the filesystem. I will use *wide_single_sci_linear.png and *wide_single_sci_log.png instead of *_single_sci_linear.png and *wide_single_sci_log.png.

ktfhale commented 10 years ago

That looks great!

walyssonBarbosa commented 10 years ago

The script is breaking at line 75:

master_images = MasterImages(header, fits_file, png_file)

It doesn't find the FILTNAM1 keyword in the fits file, which is the first filter name for wfpc2.

walyssonBarbosa commented 10 years ago

In master_images, this keyword is the description column.

walyssonBarbosa commented 10 years ago

I started testing only with acs. So, I will change the wfpc2 keyword to the one present in an acs fits file, I found out that it's FILTER1. If it's not this one we can change later.

walyssonBarbosa commented 10 years ago

I added this changes to database_interface.py so that I could work on the acs files:

Class MasterImages(Base):
    ...
    def __init__(self, header, fits_file, png_file):
        ...
        if '_c0m' in fits_file:
            self.description = header['FILTNAM1']
        else:
            self.description = header['FILTER1']
        ...
        if cr_mode == 'c0m' or cr_mode == 'wide':
            cr_mode = 'no_cr'
        ...
    ...

And this in build_master_images_table.py:

def build_master_images_table_main(png_file_list, reproc, reproc_sets):
       ...
        if '_linear.png' in png_file:
            fits_file = png_file.replace('png/','').replace('_linear.png','.fits')
        elif '_log.png' in png_file:
            fits_file = png_file.replace('png/','').replace('_log.png','.fits')
        ...
walyssonBarbosa commented 10 years ago

I finished populating master_images with acs and wfc3 *_wide_single_sci_linear.png images.

walyssonBarbosa commented 10 years ago

No longer relevant as we no longer use png files as the primary key.