Coder Social home page Coder Social logo

helpfulsnippets's Introduction

HelpfulSnippets

Small tools to make working with astronomical data a little bit easier.

Simple Image Tester

Sometimes, running batch downloads of FITS files leads to some strange or corrupted files. Run this tool on a directory containing fits images (extension .fits or .fit) to see if any are corrupted.

python simple_image_tester.py top_level_dir

It will print out the filenames of any files that won't open, and will tell you how many need to be dealt with (if any).

FITS Compiler

Sometimes you want to compile a bunch of files in a directory into one big file for easier processing. This script does just that! Please note that the method requires all consistutent input FITS files to remain open until after saving the compiled file, until after when they are all closed. This might require high RAM usage for large files, but it runs very well on small to medium sized directories.

python FitsCompiler.py input_directory/ output_filename.fits

Coverage Getter

This script will obtain RA and DEC points of FITS images, running on a directory and finding all FITS files within nested subdirectories. For each file, it will obtain a WCS and image, and return RA and DEC points at the top left and bottom right corners of the image.

python coverage_getter.py top_level_dir -o output_filename.fits

It will save as an output table (the name can be customized by the user). Each row contains the filename, and 4 points to reconstruct a coverage map.

Cutout Viewer

This is a simple tool to generate a visualization of results from a set of cutouts. Will work seamlessly with the output of Cutout Creator. Users can specify the colormap to display images with (which must be MatPlotLib friendly), and the DPI to adjust output image quality.

python CutoutViewer.py input_filename.fits output_filename --cmap STRING --dpi INT

Command Line Args Template

This script serves as a template for getting some software running that needs to take in command line arguments from the user. It includes a few examples to get you on your way. To test that things are working, you can run the following:

python CLArgsTemplate.py and python CLArgsTemplate.py -h

TBriDGE Command Line Wrapper

This script tbridge_cl.py is designed to serve as a simple tool to get you going using TBriDGE through the command line. The user can easily configure this script moving forward to accomodate more unique projects.

helpfulsnippets's People

Contributors

hsouch avatar

Watchers

 avatar

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.