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

An incomprehensible error when using star_info.csv to run #49

Open
diyiliaoya opened this issue May 8, 2023 · 4 comments
Open

An incomprehensible error when using star_info.csv to run #49

diyiliaoya opened this issue May 8, 2023 · 4 comments

Comments

@diyiliaoya
Copy link

diyiliaoya commented May 8, 2023

Hi ashleychontos,

This happened when I run TIC140938975.
When I run the command with the following arguments in the command line, there are no issues with the result:
pysyd run --star 140938975 --sp 0.5 --lx 15
But when I run the command with the arguments placed in star_info.csv, the following error occurs
Traceback (most recent call last):
File "/home/lishijie/anaconda3/envs/pySYD-env/bin/pysyd", line 8, in
sys.exit(main())
^^^^^^
File "/home/lishijie/anaconda3/envs/pySYD-env/lib/python3.11/site-packages/pysyd/cli.py", line 663, in main
args.func(args)
File "/home/lishijie/anaconda3/envs/pySYD-env/lib/python3.11/site-packages/pysyd/pipeline.py", line 193, in run
_pipe(args.stars, params)
File "/home/lishijie/anaconda3/envs/pySYD-env/lib/python3.11/site-packages/pysyd/pipeline.py", line 133, in _pipe
star.process_star()
File "/home/lishijie/anaconda3/envs/pySYD-env/lib/python3.11/site-packages/pysyd/target.py", line 157, in process_star
self.derive_parameters()
File "/home/lishijie/anaconda3/envs/pySYD-env/lib/python3.11/site-packages/pysyd/target.py", line 991, in derive_parameters
self.first_step()
File "/home/lishijie/anaconda3/envs/pySYD-env/lib/python3.11/site-packages/pysyd/target.py", line 1173, in first_step
self.global_fit()
File "/home/lishijie/anaconda3/envs/pySYD-env/lib/python3.11/site-packages/pysyd/target.py", line 1568, in global_fit
self.frequency_spacing()
File "/home/lishijie/anaconda3/envs/pySYD-env/lib/python3.11/site-packages/pysyd/target.py", line 1752, in
frequency_spacing
l, a = pl.pop(idx), pa.pop(idx)
^^^^^^^^^^^
TypeError: 'NoneType' object cannot be interpreted as an integer

140938975_LC.txt
140938975_PS.txt

@ashleychontos
Copy link
Owner

Hi there @diyiliaoya, thank you for bringing this to my attention!

A couple quick questions:

  • what version of pysyd are you using?
  • does the same error occur if you use python3.8, 3.9 or 3.10? I ask because the unitests run on only those 3 versions so if it's related to this, I'd like to update the compatibility.

@diyiliaoya
Copy link
Author

Hi there @diyiliaoya, thank you for bringing this to my attention!

A couple quick questions:

  • what version of pysyd are you using?
  • does the same error occur if you use python3.8, 3.9 or 3.10? I ask because the unitests run on only those 3 versions so if it's related to this, I'd like to update the compatibility.

pysyd=6.10.5
the same error occur when I use python 3.8, 3.9, 3.10

@redeaglekr
Copy link

redeaglekr commented Aug 14, 2023

Hi @ashleychontos ,

I found a similar error when running the star KIC 1028267. Tracing back, the error was found to be with the auto correlation function (attached plot) not having enough peaks, when comparing with the auto correlation function of KIC 1027337 (for whom PySYD worked well!). Looking at the code, I understand that lack of enough peaks maybe the reason why the function "_max_elements" fail ? ":thinking_face"
autoact_1027337
autoact_1028267

@ashleychontos
Copy link
Owner

Thanks @redeaglekr for looking into this and that sounds like a very plausible explanation. One way around this would be to crank down the smoothing of the power spectrum (i.e. --sp via command line). By default it is 2.5 muHz, which works well for less evolved stars but based on your provided ACF (x-axis values)... it looks like your star may be more evolved. If it's over-smoothing the PS, that will remove most features in the ACF >> and thus, leading to this error. One can also try changing '--npeaks' if that really is the problem.

However, what @diyiliaoya brought up is an inconsistency with how the program operates on a more macro level. I agree that what @redeaglekr suggested is probably what happened in the second scenario the caused the original issue, meaning that the '--sp 0.5' probably didn't read in properly from the star_info.csv file.

Just a heads up to you both that I am currently working on the way the inputs are handled, which may ultimately solve this problem.... unless @diyiliaoya you've figured out an alternate solution?

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

3 participants