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

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

Open
reneheller opened this issue Feb 8, 2019 · 4 comments

Comments

@reneheller
Copy link

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
Copy link
Owner

timothydmorton commented Feb 8, 2019 via email

@elisabethadams
Copy link

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
Copy link
Author

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
Copy link
Author

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.

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