Git Product home page Git Product logo

constellationlines-generator's Introduction

ConstellationLines Generator v0.1

Abstract

This is a tool for modifying the constellation lines of the script "AnnotateImage" in PixInsight (https://pixinsight.com/) to suit your preferred way of connecting stars. You can create a plain text file in a simple format to define the 'constellation lines definition file' and use this tool to generate the configuration file of AnnotateImage (ConstellationLines.json). You can also replace only the constellation lines of specific constellations in the existing configuration.

Operating Environment

This tool works in an environment where Python 3 is installed. It has been tested and confirmed to work in the following environment.

  • Ubuntu 20.04 LTS
  • Anaconda 4.12.0
    • python 3.7.13
    • astropy 4.3.1
    • astroquery 0.4.6

Constellation Lines Definition File

The constellation lines definition file is a file saved in UTF-8 encoding and follows the format of the following example text.

# constellation lines in Japan

Cnc:
ι-γ
γ-η-θ-δ-γ
θ-β
δ-α

Gem:
31-24-43-55-78-66-46-27-13-7-1
55-54
46-34
  • Lines starting with # are comments.
  • Empty lines or lines consisting only of whitespace characters are ignored.
  • Lines ending with : specify the 3 letters abbreviation for a constellation.
    • From this line until the next abbreviation line, the definitions of constellation lines correspond to the abbreviation specified here.
  • Lines consisting of integers or Greek letters separated by - represent constellation lines.
    • Each integer or Greek letter represents a star connected by the constellation line.
      • Integers represent Flamsteed numbers.
      • Greek letters represent Bayer names.

Location to Save ConstellationLines.json

The configuration file for constellation lines of "AnnotateImage", ConstellationLines.json, can be found in the following directories:

  • Linux: /opt/PixInsight/src/scripts/AdP/
  • macOS: /Applications/PixInsight/src/scripts/AdP/
  • Windows: C:\Program Files\PixInsight\src\scripts\AdP\

Since ConstellationLines.json will be overwritten by the output of this tool, please make sure to back up the original file beforehand.

Furthermore, when "AnnotateImage" is updated, there is a possibility that ConstellationLines.json will be reverted to its original state or replaced with a new version. Therefore, it is advisable to also backup the ConstellationLines.json file generated by this tool, as needed.

Usage

Generate ConstellationLines.json

If the constellation lines definition file is lines.txt and the output file is ConstellationLines.json, execute the following command-line:

python clg.py lines.txt ConstellationLines.json

In this case, the contents of ConstellationLines.json will be completely removed and replaced with the constellation lines defined in lines.txt.

To merge the constellation lines defined in lines.txt with the existing ConstellationLines.json, specify the -m option.

python clg.py -m lines.txt ConstellationLines.json

In this case, only the constellation lines corresponding to the constellations included in lines.txt will be removed from the existing ConstellationLines.json, and the constellation lines defined in lines.txt will be added to the remaining constellation lines.

Usage of Generated ConstellationLines.json

To apply the generated ConstellationLines.json, overwrite the file in the aforementioned save location. The changes will take effect from the next execution of "AnnotateImage". Restarting PixInsight is not required.

License

MIT License.

constellationlines-generator's People

Contributors

rnanba 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.