MickaelRigault / ztfquery

Access ZTF data from Python
Apache License 2.0
37 stars 18 forks source link

ztfquery cuts off data from 2019 #15

Closed MichaelMedford closed 5 years ago

MichaelMedford commented 5 years ago

I am getting some unexpected behavior when using obsjd in the sql_query parameter of ZTFQuery.

from ztfquery import query
zquery = query.ZTFQuery()
zquery.load_metadata(sql_query="obsjd>2458450.0")
obsjd = zquery.metatable.obsjd.values - 2458484.5
 # January 1, 2019

Plotting up the resulting dates shows that there is nothing showing up for 2019.

Screen Shot 2019-10-02 at 3 32 47 PM
MickaelRigault commented 5 years ago

The 2019 data are not public, while the MSIP ones from 2018 are

so 2 solutions:

To check option 2, do:

from ztfquery import io
io._load_id_("irsa")

and see if the results are correct. If not do:

io.set_account("irsa")

If it is correct. Contact Frank Masci to check if your account is indeed associated to ZTF

MickaelRigault commented 5 years ago

@MichaelMedford could you check if this is a password issue ?

MichaelMedford commented 5 years ago

I made two simultaneous changes, either of which may of fixed the issue. I changed my password to no longer include a special character, and I deleted the password file to generate a new one. Either way, I was able to get access to all data.

MickaelRigault commented 5 years ago

ok, for the future. To update your password (for instance here for irsa), simply do:

from ztfquery import io
io.set_account("irsa")