timothydmorton / VESPA

Validation of Exoplanet Signals using a Probabilistic Algorithm--- calculating false positive probabilities for transit signals
MIT License
36 stars 20 forks source link

The `representation` keyword/property name is deprecated in favor of `representation_type` #26

Open reneheller opened 5 years ago

reneheller commented 5 years ago

Running calcfpp I received the following error message.

File "/anaconda3/lib/python3.7/site-packages/astropy/coordinates/baseframe.py", line 128, in _representation_deprecation 'favor of representation_type', AstropyDeprecationWarning) astropy.utils.exceptions.AstropyDeprecationWarning: The representation keyword/property name is deprecated in favor of representation_type FPP calculation failed for ..

So I opened

/anaconda3/lib/python3.7/site-packages/astrop/coordinates/baseframe.py

and replaced the "representation" keyword with "representation_type" throughout the file. I then reran calcfpp resulting in this error message:

File "/anaconda3/lib/python3.7/site-packages/VESPA-0.5.1-py3.7-macosx-10.7-x86_64.egg/vespa/orbits/populations.py", line 336, in init self.obspos = SkyCoord(obsx,obsy,obsz,representation='cartesian') File "/anaconda3/lib/python3.7/site-packages/astropy/coordinates/sky_coordinate.py", line 248, in init frame_cls, frame_kwargs = _get_frame_without_data(args, kwargs) File "/anaconda3/lib/python3.7/site-packages/astropy/coordinates/sky_coordinate_parsers.py", line 201, in _get_frame_without_data _normalize_representation_type(kwargs) File "/anaconda3/lib/python3.7/site-packages/astropy/coordinates/baseframe.py", line 141, in _normalize_representation_type _representation_deprecation() File "/anaconda3/lib/python3.7/site-packages/astropy/coordinates/baseframe.py", line 128, in _representation_deprecation 'favor of representation_type', AstropyDeprecationWarning) astropy.utils.exceptions.AstropyDeprecationWarning: The representation keyword/property name is deprecated in favor of representation_type

I then replaced any mentioning of the keyword "representation" with "representation_type" throughout the file

/anaconda3/lib/python3.7/site-packages/VESPA-0.5.1-py3.7-macosx-10.7-x86_64.egg/vespa/orbits/populations.py

and ran calcfpp again. Then it worked.

I assume that VESPA 0.5.1 is using a deprecated "representation" keyword when calling astropy. This should be changed to "representation_type".

timothydmorton commented 5 years ago

Thanks for checking this out! Feel free to make a PR fixing this.

BTW, just a heads-up, if you are using vespa for TESS targets, there is a development branch on which I've been working toward this, so I can point you to that if you're adventurous.

On Fri, Feb 8, 2019 at 4:24 AM reneheller notifications@github.com wrote:

Running calcfpp I received the following error message.

File "/anaconda3/lib/python3.7/site-packages/astropy/coordinates/baseframe.py", line 128, in _representation_deprecation 'favor of representation_type', AstropyDeprecationWarning) astropy.utils.exceptions.AstropyDeprecationWarning: The representation keyword/property name is deprecated in favor of representation_type FPP calculation failed for ..

So I opened

/anaconda3/lib/python3.7/site-packages/astrop/coordinates/baseframe.py

and replaced the "representation" keyword with "representation_type" throughout the file. I then reran calcfpp resulting in this error message:

File "/anaconda3/lib/python3.7/site-packages/VESPA-0.5.1-py3.7-macosx-10.7-x86_64.egg/vespa/orbits/populations.py", line 336, in init self.obspos = SkyCoord(obsx,obsy,obsz,representation='cartesian') File "/anaconda3/lib/python3.7/site-packages/astropy/coordinates/sky_coordinate.py", line 248, in init frame_cls, frame_kwargs = _get_frame_without_data(args, kwargs) File "/anaconda3/lib/python3.7/site-packages/astropy/coordinates/sky_coordinate_parsers.py", line 201, in _get_frame_without_data _normalize_representation_type(kwargs) File "/anaconda3/lib/python3.7/site-packages/astropy/coordinates/baseframe.py", line 141, in _normalize_representation_type _representation_deprecation() File "/anaconda3/lib/python3.7/site-packages/astropy/coordinates/baseframe.py", line 128, in _representation_deprecation 'favor of representation_type', AstropyDeprecationWarning) astropy.utils.exceptions.AstropyDeprecationWarning: The representation keyword/property name is deprecated in favor of representation_type

I then replaced any mentioning of the keyword "representation" with "representation_type" throughout the file

/anaconda3/lib/python3.7/site-packages/VESPA-0.5.1-py3.7-macosx-10.7-x86_64.egg/vespa/orbits/populations.py

and ran calcfpp again. Then it worked.

I assume that VESPA 0.5.1 is using a deprecated "representation" keyword when calling astropy. This should be changed to "representation_type".

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/timothydmorton/VESPA/issues/26, or mute the thread https://github.com/notifications/unsubscribe-auth/ABzr2xc4tP9N0ZIQtShXJBKJCldmguhPks5vLUI8gaJpZM4auina .

-- about.me/tim.morton

elisabethadams commented 5 years ago

I would just like to thank you, Rene, for posting this! I also had to edit my local files (at the end of a long terrible re-re-install involving virtual environments and a lot of guess-and-test-work about which versions of which packages play nicely with each other and vespa/isochrones), and this was the final hurdle to overcome.

Note that I also had to edit other files for representation:

//anaconda/envs/vespa3/lib/python3.6/site-packages/vespa/orbits/utils.py //anaconda/envs/vespa3/lib/python3.6/site-packages/astropy/coordinates/sky_coordinate_parsers.py

and also fix this: File "//anaconda/envs/vespa3/lib/python3.6/site-packages/vespa/stars/trilegal.py", line 97, in get_trilegal df = pd.read_table(outfile, sep='\s+', skipfooter=1, engine='python') File "//anaconda/envs/vespa3/lib/python3.6/site-packages/pandas/io/parsers.py", line 611, in parser_f FutureWarning, stacklevel=2) FutureWarning: read_table is deprecated, use read_csv instead.

reneheller commented 5 years ago

Timothy, thanks for pointing out the development branch towards using VESPA with TESS data. I'm not that far with TESS because we currently re-doing a transit search in the entire Kepler/K2 sample with TLS (https://arxiv.org/abs/1901.02015, rather than BLS) to find previously missed Earth-sized planets, and this will take months if not ~a year to complete.

Elisabeth, thanks for your feebdack! I'm delighted to see that this issue posting was helpful to someone else.

reneheller commented 4 years ago

Thanks for checking this out! Feel free to make a PR fixing this. BTW, just a heads-up, if you are using vespa for TESS targets, there is a development branch on which I've been working toward this, so I can point you to that if you're adventurous. On Fri, Feb 8, 2019 at 4:24 AM reneheller @.**> wrote: Running calcfpp I received the following error message. File "/anaconda3/lib/python3.7/site-packages/astropy/coordinates/baseframe.py", line 128, in _representation_deprecation 'favor of representation_type', AstropyDeprecationWarning) astropy.utils.exceptions.AstropyDeprecationWarning: The representation keyword/property name is deprecated in favor of representation_type FPP calculation failed for .. So I opened /anaconda3/lib/python3.7/site-packages/astrop/coordinates/baseframe.py and replaced the "representation" keyword with "representation_type" throughout the file. I then reran calcfpp resulting in this error message: File "/anaconda3/lib/python3.7/site-packages/VESPA-0.5.1-py3.7-macosx-10.7-x86_64.egg/vespa/orbits/populations.py", line 336, in init self.obspos = SkyCoord(obsx,obsy,obsz,representation='cartesian') File "/anaconda3/lib/python3.7/site-packages/astropy/coordinates/sky_coordinate.py", line 248, in init* frame_cls, frame_kwargs = _get_frame_without_data(args, kwargs) File "/anaconda3/lib/python3.7/site-packages/astropy/coordinates/sky_coordinate_parsers.py", line 201, in _get_frame_without_data _normalize_representation_type(kwargs) File "/anaconda3/lib/python3.7/site-packages/astropy/coordinates/baseframe.py", line 141, in _normalize_representation_type _representation_deprecation() File "/anaconda3/lib/python3.7/site-packages/astropy/coordinates/baseframe.py", line 128, in _representation_deprecation 'favor of representation_type', AstropyDeprecationWarning) astropy.utils.exceptions.AstropyDeprecationWarning: The representation keyword/property name is deprecated in favor of representation_type I then replaced any mentioning of the keyword "representation" with "representation_type" throughout the file /anaconda3/lib/python3.7/site-packages/VESPA-0.5.1-py3.7-macosx-10.7-x86_64.egg/vespa/orbits/populations.py and ran calcfpp again. Then it worked. I assume that VESPA 0.5.1 is using a deprecated "representation" keyword when calling astropy. This should be changed to "representation_type". — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#26>, or mute the thread https://github.com/notifications/unsubscribe-auth/ABzr2xc4tP9N0ZIQtShXJBKJCldmguhPks5vLUI8gaJpZM4auina . -- about.me/tim.morton

Hi Timothy, may I come back to your offer to point me to the development branch of vespa for TESS? I'm still having trouble to get vespa 6.0 running on my MacBook and so I'm wondering if a newer version could overcome some of those bugs.