HeloiseS / hoki

Bridging the gap between observation and theory
https://heloises.github.io/hoki/intro.html
BSD 3-Clause "New" or "Revised" License
47 stars 8 forks source link

HR diagram greyscale colorbar [DOCS] #87

Closed AlexandreLegault closed 1 year ago

AlexandreLegault commented 1 year ago

There is no colorbar immediately provided to describe the greyscale when plotting HR diagrams. I think I understand that the greyscale describes the number of objects expected in a logT-logL bin for a given age, which can be associated with the probability of finding an object in that bin. If I was to include a colorbar, how can I properly describe it? Thanks!

HeloiseS commented 1 year ago

Essentially the levels are increments of factors of 10 (not "fractions" of 10 like I wrote in my comment hahah). So you take the maximum value possible and the contours by default (which are ones I hard coded) are 10 %, 1%, 0.01% etc of the maximum probability on the graph. Here is the code that makes the colorscaling happen

    # we want our levels to be fractions of 10 of our maximum value
    possible_levels = [#top_level*0.00000000001,
                       #top_level*0.0000000001,
                       #top_level*0.000000001,
                       top_level*0.00000001,
                       top_level*0.0000001,
                       top_level*0.000001,
                       top_level*0.00001,
                       top_level*0.0001,
                       top_level*0.001,
                       top_level*0.01,
                       top_level*0.1,
                       top_level]