Code Monkey home page Code Monkey logo

simbad-resolver's Introduction

TargetResolver

This is a simple Java interface, developed for the PANIC instrument, to the SIMBAD name resolver. The database is queried and the information about the astronomical object, if found, returned as a TargetInformation instance. This object, in turn, can be used to plot, using Staralt, the altitude of the object against time in a particular night. By default, altitudes are plotted for tonight and the Calar Alto Observatory, where PANIC is to be commissioned.

Example: M101

Fetch the information of the Pinwheel Galaxy, and download its Staralt plot:

try {
    TargetResolver resolver = new TargetResolver();
    TargetInformation info = resolver.submit("M101");
    System.out.println(info);

    Staralt staralt = new Staralt();
    File plot = staralt.plot(info); /* At CAHA, today */
    System.out.println();
    System.out.println("Staralt plot saved to: " + plot.getAbsolutePath());

    /* Do stuff with the plot */

    plot.deleteOnExit(); /* don't clutter the temporary directory */

} catch (TargetNotFoundException e) {
    System.out.println("not found!");
} catch (SIMBADQueryException e) {
    System.out.println("connection failed");

The output would look something like this:

Name: M101
Type: Interacting Galaxies
RA: 14 03 12.51 (210.802120)
DEC: +54 20 53.1 (54.348080)
Epoch: J2012 | Equinox: 2000
Reference system: ICRS
Proper motions: null null

Staralt plot saved to: /tmp/staralt_4441903800833962906.gif

simbad-resolver's People

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.