afeinstein20 / eleanor

A tool for light curve extraction from the TESS FFIs.
MIT License
92 stars 39 forks source link

zsh: illegal hardware instruction when running eleanor.TargetData() #255

Open joeynadol opened 2 years ago

joeynadol commented 2 years ago

Hi! I'm relatively new to this package and was running some quick code, but ran into a roadblock. I get the output: zsh: illegal hardware instruction python3 Desktop/path/filename.py every time I call eleanor.TargetData(). I believe this to be an incompatibility issue with the new M1 Mac (due to other similar errors I've seen online) and I'm not sure if there's an easy fix...please do let me know if anyone's found a workaround for this.

Edit: when setting parameters do_psf and do_pca to False (originally both had them as True) the issue disappears. Both need to be False in order for the error to disappear. There's definitely something still worth looking at here, though.

benmontet commented 2 years ago

I believe the most likely culprit here is tensorflow, especially given your edit.

Are you sure that you get this error if you run it with do_psf = False and do_pca = True? That is surprising to me. There's nothing used in the code in the PCA flux generation that's not done in other bits of the code.

I believe it should be only in the PSF modeling where you see this error. Finding and installing a version of tensorflow that is built for the M1 chip (this might involve compiling from source) should be sufficient to solve this problem I think, and if you are happy to not do any PSF modeling you should be able to run everything else fine as long as you call the code with do_psf = False when you run TargetData (which I believe is the default!)

Good luck!