zkbt / chromatic

Tools for visualizing spectrosopic light curves, with flux as a function of wavelength and time.
MIT License
14 stars 4 forks source link

Installation issue on macOS Monterey (problems with the batman-package) #176

Closed gangio94 closed 2 years ago

gangio94 commented 2 years ago

Dear all, I'm trying to install the chromatic-lightcurves package on macOS Monterey version 12.2 thanks to the usual command

pip install chromatic-lightcurves

But no matter how hard I try, I get the same error: "Failed building wheel for batman-package". Same thing happens when I try to install this batman-package on its own. I tried several possible solutions but have not found any of them to be valid. I also tried to install previous versions of the chromatic-lightcurves package but without any success.

It would appear that this issue is halting the installation, since I'm unable to import the chromatic-lightcurves in my jupyter notebook.

Do you have some suggestions? Is someone else experiencing the same issue? Thank you.

gangio94 commented 2 years ago

I also tried to run this package on Colab, and I was able to install the chromatic-lightcurves package. However, when I try to create a rainbow object from the WASP96b JWST x1dints.fits data running the code

rainbow = read_rainbow(filename, format='x1dints_kludge')

I get this:

`🌈 Warning: No times found! Making up imaginary ones! 🌈 Warning: The imaginary times assume 76.916 s/integration. 0% 0/1 [00:01<?, ?it/s]

IndexError Traceback (most recent call last) in () 1 filename = "/jw02734-o002_t002_niriss_clear-gr700xd-substrip256_x1dints.fits" ----> 2 rainbow = read_rainbow(filename, format='x1dints_kludge') 3 #rainbow.title = "WASP-96b | NIRISS | x1dints"

4 frames /usr/local/lib/python3.7/dist-packages/astropy/units/quantity.py in setitem(self, i, value) 1065 if not self.isscalar and 'info' in self.dict: 1066 self.info.adjust_indices(i, value, len(self)) -> 1067 self.view(np.ndarray).setitem(i, self._to_own_unit(value)) 1068 1069 # contains is OK

IndexError: index 99 is out of bounds for axis 1 with size 99`

zkbt commented 2 years ago

Hi @gangio94 ! I'm so, so, so sorry for the long delay in getting back to you on these issues. I don't know if any of this is still relevant to you and what you're trying to do, but here are a few thoughts.

On the installation issue, I'm encouraged that you were able to install and run the code successfully on colaboratory. As for the problem that was causing it to not work on your own computer, my guess would be a version problem with one of the dependencies needed to install and/or compile batman-package. One strategy I've had success with in the past is to try to install into a new conda environment, and let it try to install all of the dependencies needed from scratch. That should look something like conda create -n my-new-environment python=3.10 to make the new environment, followed by conda activate my-new-environment to switch into that environment (you can list your environments at any time with conda env list), and then finally pip install chromatic-lightcurves in that environment. Hope that works?

Then, on the file reading front, I have updated the reader to handle some Stage 3 x1dints pipeline outputs (which looks from the filename like the kind of file you were trying to load). However, the x1dints files being produced automatically by the jwst pipeline at Stage 3 still seem to be behaving very weirdly for me (missing data or misordered times), so I'd strongly encourage trying to read the Stage 2 x1dints files instead, which are split into separate segments and tend to have more accurate timing information included in them. See here for how to tell Stage 2 from Stage 3 using the filename. Sorry this isn't a perfect solution, but I hope it helps?

zkbt commented 2 years ago

I'm going to close this issue for now, but @gangio94 if you check back in on this and still run into problems, please feel very free to re-open it and/or a new Issue!