kammerje / spaceKLIP

Pipeline for reducing JWST high-contrast imaging data. Published in Kammerer et al. 2022 and Carter et al. 2022.
https://ui.adsabs.harvard.edu/abs/2022SPIE12180E..3NK/abstract
MIT License
16 stars 10 forks source link

Issue when running ImageTools.align_frames running out of colors to assign for plot #187

Closed strampelligiovanni closed 3 months ago

strampelligiovanni commented 3 months ago

When running ImageTools.align_frames with 10 or more items in the Database the pipeline return the following error:

Traceback (most recent call last):
  File "/Users/gstrampelli/miniconda3/envs/spaceklip/lib/python3.11/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/gstrampelli/spaceKLIP/spaceKLIP/imagetools.py", line 2171, in align_frames
    s=5, color=colors[len(seen)], marker=syms[0], 
               ~~~~~~^^^^^^^^^^^
IndexError: list index out of range

I believe this is due to the fact that color is defined as colors = plt.rcParams['axes.prop_cycle'].by_key()['color'] and its length is only 10, so it runs out of colors to assign.

wbalmer commented 3 months ago

Bumping this - I ran into this issue when compiling a big library.

AarynnCarter commented 3 months ago

Resolved in #189