Code Monkey home page Code Monkey logo

Comments (3)

rnanba avatar rnanba commented on July 29, 2024

fits を読む処理で警告ということは上手くいかないのは leda-get-votable.py の方でしょうか。こちらでは出たことのない現象でちょっと原因が思いつきません。可能なら引数で渡したファイル一式を送っていただけないでしょうか。
ただし今月いっぱいは時間がとれなさそうなので調査はだいぶ先になりそうです…

from galaxyannotator.

rnanba avatar rnanba commented on July 29, 2024

お返事遅くなって申し訳ありません。調査したところ、どうやら HyperLeda のデータで視線速度(v)がマイナスの銀河でエラーになっていました。

    exp = math.ceil(math.log10(d_ly) - args.distance_precision)
                    ^^^^^^^^^^^^^^^^
ValueError: math domain error

視線速度がマイナスの銀河は大抵近くの銀河で距離が測定済みで mod0 (光度距離)がデータに入っているので赤方偏移から距離を計算する処理に入らないのですが、mod0 はないけど v に負の値が入っている銀河があって、そこで負の赤方偏移の log を計算しようとしてエラーになっていました。

こういう銀河のデータからは距離は計算できないので、-d オプションが指定されている場合、デフォルトではエラーにして、-i オプションを指定した場合には距離を計算せずに先に進むように修正します。

from galaxyannotator.

rnanba avatar rnanba commented on July 29, 2024

-d オプションが指定されている場合、デフォルトではエラーにして、-i オプションを指定した場合には距離を計算せずに先に進むように修正します。

ここはちょっと考え直しました。-i オプションは -m オプション指定時の等級不明な銀河の扱いを制御するオプションで、これを本件エラーの抑制と兼用するのは使いにくくなるので、エラーにはせず、警告をコンソール(標準エラー出力)に出力し、desc は出力しないという動作にします。

オプションで --show-negative-redshift を指定すると z 値を desc に出力するようにしますので、警告を見て気になったらこれを指定してどの銀河がそれか確認できるようにします。

from galaxyannotator.

Related Issues (13)

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.