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

Ambiguous Truth Value Error in aperture_mask Comparison in giants/target.py #21

Open
prashant050701 opened this issue Dec 3, 2024 · 0 comments

Comments

@prashant050701
Copy link

prashant050701 commented Dec 3, 2024

@nksaunders

Was trying the example in the readme and library raises a ValueError when using the fetch_and_clean_data method with certain aperture_mask values. The error is pointing to an ambiguous truth value when comparing the aperture_mask parameter with the string 'center'.

import giants
target = giants.Target(ticid=176956893)
target.fetch_and_clean_data(sectors=[1,2])
target.create_summary_plot()

Traceback (most recent call last):
  File "/TESS_giants/test.py", line 3, in <module>
    target.fetch_and_clean_data(sectors=[1,2])
  File "/python3.11/site-packages/giants/target.py", line 524, in fetch_and_clean_data
    lc = self.from_lightkurve(sectors=sectors, flatten=flatten, aperture_mask=aperture_mask, zero_point_background=zero_point_background, n_pca=n_pca)
         
  File "/python3.11/site-packages/giants/target.py", line 183, in from_lightkurve
    elif (aperture_mask == 'center'):
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
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