HacktheUniverse / star-api

All these stars belong to you
http://star-api.herokuapp.com/
80 stars 16 forks source link

Add Color Temperature and RGB Color #40

Open mienaikoe opened 10 years ago

mienaikoe commented 10 years ago

On Cosmosis, we used some equations we found online to calculate the Color Temperature, and subsequently the RGB color, from the B-V Color. You can find our ruby implementation here: https://github.com/HacktheUniverse/cosmos/blob/master/data/speck/stars.rb

It would be great to get this data into the API so star color could be implemented without frontend calcuation.

nicholalexander commented 10 years ago

@mienaikoe - Awesome idea, thanks! i think we can make a new rake task like rake:star:add_rgb which goes through the database and calculates rgb (and that second number - which is the same as lumbinosity - is being used on the front as the alpha in the rgba, yes?

mienaikoe commented 10 years ago

Well the luminosity isn't used in that method. It's a relic from doing that method at midnight.

Luminosity could be factored in if you want. Maybe absolute magnitude would be more suited to the task? I don't know enough about astronomy to comment on that.

I like the rake task idea though.

nicholalexander commented 10 years ago

OK cool. Let's keep it as a pure rgb calculation. Really cool idea, thanks! On Nov 14, 2014 12:05 PM, "Jesse" notifications@github.com wrote:

Well the luminosity isn't used in that method. It's a relic from doing that method at midnight.

Luminosity could be factored in if you want. Maybe absolute magnitude would be more suited to the task? I don't know enough about astronomy to comment on that.

Reply to this email directly or view it on GitHub https://github.com/HacktheUniverse/star-api/issues/40#issuecomment-63095880 .

surenm commented 9 years ago

@nicholalexander Do you want to fix this up?