GithubHelp home page GithubHelp logo

gaia_alignment's Introduction

Gaia Alignment

This repository contains tools used for aligning HST images to Gaia. This workflow is especially good for large mosaics/datasets multiple points but little to no overlap. Currently, an example workflow is contained in a Jupyter notebook, though more notebooks/scripts may be added later in order to provide a more complete drizzling workflow.

The code currently provides functionality to determine the query region, perform the query, and pass the resulting catalog into TweakReg. Examples querying other services (such as MAST and DSS images) are also included. The notebook uses a small subset of data from a larger HST program as an example, but the process is very scalable. The full program was mosaicked using the same process:

alt text

Requirements

To run this notebook successfully, you will need an astroconda environment running Python (2.7 hsould work, but the code was written in 3.5).

You will also need to install the astroquery package:

$ conda install -c astropy astroquery

gaia_alignment's People

Contributors

vb2341 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gaia_alignment's Issues

Add other catalogs

As @mgennaro suggested, it could be could to supplement Gaia's source lists with catalogs from other surverys, like PanSTARRS/VISTA.

Would probably need to first get the secondary catalog, align that to Gaia via spacetelescope/drizzlepac#77 and then use that aligned catalog with TweakReg.

Make visit level drizzling notebook

My typical workflow initially drizzles data taken in the same visit and filter. This creates higher SNR images used for source detection, and filters CRs. Creating a notebook or script to do this, as well as applying the the tweaked WCS to the headers of the input FLTs will likely create a more efficient processing for users.

Reference files are needed

For users who don't have the iref/jref environmental variables and reference files locally, the reference files should be downloaded. The following cell does the job if you add it after the MAST downloads:

from urllib.request import urlretrieve 

os.environ['iref'] = '~/iref/'
if not os.path.exists('iref'):
    os.mkdir('iref')

os.environ['jref'] = '~/jref/'
if not os.path.exists('jref'):
    os.mkdir('jref')

base_url = 'https://hst-crds.stsci.edu/unchecked_get/references/hst/'

files = glob.glob('data_download/mastDownload/HST/*/*fl?.fits')

for file in files:
    with fits.open(file) as hdu:
        for key in ['IDCTAB','NPOLFILE','D2IMFILE']:
            reffile_name = hdu[0].header[key].replace('$', '/')
            print(reffile_name)
            if not os.path.exists(reffile_name):
                urlretrieve(base_url + os.path.basename(reffile_name), reffile_name)

Update the help

Tyler Desjardins mentions that we should consider moving emails from help[at]stsci.edu to point to the web portal where possible and appropriate. For HST (or any non-JWST), it is https://hsthelp.stsci.edu . For JWST, it is https://jwsthelp.stsci.edu . Please update info in setup.py, setup.cfg, documentation, etc as appropriate.

Please close this issue if it is irrelevant to your repository. This is an automated issue. If this is opened in error, please let pllim know!

xref spacetelescope/hstcal#317

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.