Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Star label missing #12

Open
lgarrido opened this issue Jun 5, 2022 · 2 comments
Open

Star label missing #12

lgarrido opened this issue Jun 5, 2022 · 2 comments

Comments

@lgarrido
Copy link

lgarrido commented Jun 5, 2022

Hi!

I'm trying to get an A4 chart of Gemini per the included example.

It works fine up to angular_width=22.2. When I push it to 22.3 or beyond, Castor's label disappears.

Fiddling with the center of the chart or font_size may bring it back in some cases, but it's finicky.

Am I missing some configuration tweak?

Regards,

L

# Default settings which affect all the charts below
DEFAULTS
ra_central=7.25
dec_central=20
angular_width=40.0
mag_min=7
width=17.8
aspect=1.36
ra_dec_lines=1
constellation_boundaries=1
constellation_sticks=1
constellation_stick_design=rey
coords=ra_dec
projection=gnomonic
star_names=1
star_flamsteed_labels=0
constellation_names=1
plot_galaxy_map=1
plot_equator=0
plot_ecliptic=0
plot_galactic_plane=1
font_size=1.2
dso_label_mag_min=6

# Produce a PDF copy of this star chart
CHART
output_filename=output/gemini.pdf
@lgarrido
Copy link
Author

lgarrido commented Jun 8, 2022

I have disabled char_check_label_exclusion() and Castor's label comes back, so there must be some object at the exclusion_regions list which somehow conflicts with it. However, I can't see any other label in the map which might clash with Castor's. I'll debug this further when I have some spare time.

@lgarrido
Copy link
Author

After some tests I found the problem is star objects of small magnitude create exclusion points (zero-size regions) that supersede labels. Lowering mag_min does away with those stars and brings back the label.

A possible modification to the drawing algorithm would be doing two passes over the labels. A first one would create their exclusion regions, then draw the stars excluding those of small magnitude (mag < star_label_mag_min) that collide with a label, then a second pass over the labels to draw them. I think this would give labels priority over small stars, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant