Coder Social home page Coder Social logo

astrometrica2ades's Introduction

Astrometrica2ADES

Code to convert Astrometrica output files into the new MPC ADES format for astrometry data interchange (link to MPC ADES page)

Installation instructions

Linux/Unix

If you want to look at and (potentially) modify the code, the method below will give you a local checkout and install it (you likely want to make an activate a virtualenv first):

  1. git clone https://github.com/LCOGT/Astrometrica2ADES
  2. cd Astrometrica2ADES
  3. pip install -r requirements.txt
  4. python setup.py install

To install it in one step, you can just do: pip install git+https://github.com/LCOGT/Astrometrica2ADES

Windows

This will setup a Virtual Environment, activate it and then install the code. You will need to activate the Virtualenv again if you restart the computer or quit the Git Bash shell.

  1. Get and install Python3 if you don't have it already (https://www.python.org/downloads/)
  2. Launch Git Bash (https://git-scm.com/downloads)
  3. virtualenv ~/ades_venv
  4. source ~/adev/Scripts/activate
  5. pip install git+https://github.com/LCOGT/Astrometrica2ADES

Usage

The basic usage is astrometrica2ades ~/path/to/MPCReport.txt. This will create an output file in MPC ADES Pipe Separated Value (PSV) format in ~/path/to/MPCReport.psv. If you want to put the PSV output in a different file, you can add it after the path to MPCReport.txt e.g. astrometrica2ades ~/path/to/MPCReport.txt ~/different/path/to/My_Output.psv

astrometrica2ades's People

Contributors

talister avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

focanag

astrometrica2ades's Issues

Doesn't work with multiple site codes in same MPCReport.txt

Output when ran with attached file:
Read 8 header lines,34 observation lines from /home/atedeschi/Asteroids/20180713/MPCReport.txt
K10GE9E 2018 07 13.729760 20 18 55.08 -25 34 42.7
Measurement from different site code (Q64) found, skipping
K10GE9E 2018 07 13.731418 20 18 55.02 -25 34 42.2
Measurement from different site code (Q64) found, skipping
K10GE9E 2018 07 13.733073 20 18 54.83 -25 34 43.5
Measurement from different site code (Q64) found, skipping
K10GE9E 2018 07 13.734739 20 18 54.73 -25 34 44.0
Measurement from different site code (Q64) found, skipping
K10GE9E 2018 07 13.736394 20 18 54.64 -25 34 44.2
Measurement from different site code (Q64) found, skipping
K17Y05E 2018 07 13.729760 20 18 17.52 -25 27 34.3
Measurement from different site code (Q64) found, skipping
K17Y05E 2018 07 13.731418 20 18 17.33 -25 27 36.4
Measurement from different site code (Q64) found, skipping
K17Y05E 2018 07 13.733073 20 18 17.12 -25 27 38.5
Measurement from different site code (Q64) found, skipping
K17Y05E 2018 07 13.734739 20 18 16.93 -25 27 40.8
Measurement from different site code (Q64) found, skipping
K17Y05E 2018 07 13.736394 20 18 16.72 -25 27 42.9
Measurement from different site code (Q64) found, skipping
K17Y05E 2018 07 13.780566 20 18 11.52 -25 28 40.4
K17Y05E 2018 07 13.782217 20 18 11.33 -25 28 42.3
K17Y05E 2018 07 13.783874 20 18 11.15 -25 28 44.9
K17Y05E 2018 07 13.785542 20 18 10.93 -25 28 46.7
K17Y05E 2018 07 13.787198 20 18 10.75 -25 28 48.8
LCOAT01 2018 07 13.729760 20 18 44.99 -25 18 57.6
Measurement from different site code (Q64) found, skipping
LCOAT01 2018 07 13.731418 20 18 44.93 -25 18 57.9
Measurement from different site code (Q64) found, skipping
LCOAT01 2018 07 13.733073 20 18 44.82 -25 18 58.6
Measurement from different site code (Q64) found, skipping
LCOAT01 2018 07 13.734739 20 18 44.74 -25 18 58.9
Measurement from different site code (Q64) found, skipping
LCOAT01 2018 07 13.736394 20 18 44.66 -25 18 59.5
Measurement from different site code (Q64) found, skipping
LCOAT01 2018 07 13.780566 20 18 42.41 -25 19 09.1
LCOAT01 2018 07 13.782217 20 18 42.29 -25 19 09.7
LCOAT01 2018 07 13.783874 20 18 42.20 -25 19 11.2
LCOAT01 2018 07 13.785542 20 18 42.15 -25 19 10.6
LCOAT01 2018 07 13.787198 20 18 42.05 -25 19 10.9
c3572 2018 07 13.729760 20 17 44.67 -25 28 19.9
Measurement from different site code (Q64) found, skipping
c3572 2018 07 13.731418 20 17 44.54 -25 28 21.3
Measurement from different site code (Q64) found, skipping
c3572 2018 07 13.733073 20 17 44.44 -25 28 22.8
Measurement from different site code (Q64) found, skipping
c3572 2018 07 13.734739 20 17 44.34 -25 28 24.4
Measurement from different site code (Q64) found, skipping
c3572 2018 07 13.736394 20 17 44.22 -25 28 26.0
Measurement from different site code (Q64) found, skipping

Traceback (most recent call last):
File "/home/atedeschi/venv/Astro2ADES/bin/astrometrica2ades", line 11, in
load_entry_point('astrometrica2ades==0.0.5', 'console_scripts', 'astrometrica2ades')()
File "/home/atedeschi/venv/Astro2ADES/lib/python2.7/site-packages/astrometrica2ades/main.py", line 47, in convert
num_objects = utils.convert_mpcreport_to_psv(mpcreport, outFile, rms_available, astrometrica_log)
File "/home/atedeschi/venv/Astro2ADES/lib/python2.7/site-packages/astrometrica2ades/utils.py", line 698, in convert_mpcreport_to_psv
data = parse_and_modify_data(line, ast_catalog, asteroids, rms_available, seeing, display)
File "/home/atedeschi/venv/Astro2ADES/lib/python2.7/site-packages/astrometrica2ades/utils.py", line 573, in parse_and_modify_data
if data['astCat'] == ' ' and ast_catalog is not None:
KeyError: u'astCat'

MPCReport.txt

Bright targets give rmsMag of 0.00

This is not accepted by the MPC for some reason. (also, not very realistic).

We probably shouldn't have error precision higher than the precision given for the base value.

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.