-
Notifications
You must be signed in to change notification settings - Fork 11
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
Number of objects #3
Comments
Thank you. "Collecting alerce_client Getting the code from https://github.com/alercebroker/alerce_client and installing does seem to work. Perhaps pip hasn't been updated yet... Best, Raphael. |
Hi Raphael, thanks for the feedback. Can you send us more details about your operating system, python version, etc...? |
@cvalenzu any ideas what could be the problem? |
I'm using a mac. Directly installing from the GitHub code works. I use conda and pip, pandas 0.24, python 3.6. |
Hmm I am also getting an issue with the queries giving me objects with dates below the minimum I set. The following returns objects with firstmjd below 58700: ` params = { |
Thanks for the input, we can reproduce the error you mention. I think there is a bug in the API, let us fix it and we will let you know once it is fixed. |
Hi, |
Hi Raphael We found the problem, the params were incorrectly formatted. "firstmjd" must be inside the "dates" key. Try the following formatting: total = 100 which returns one object |
If I run the SN notebook:
https://github.com/alercebroker/usecases/blob/master/notebooks/ALeRCE_ZTF_SupernovaUseCase.ipynb
But change the date in the query in cell 12 to look for sn at least 70 days after first light to the last 100 days it returns no objects.
What am I doing wrong?
Many thanks,
Raphael.
(postdoc at IAC)
query='''
select probabilities.oid, probabilities.other_prob, objects.meanra,
objects.meandec, objects.nobs, objects.mean_magpsf_g, objects.mean_magpsf_r,
objects.min_magpsf_g, objects.min_magpsf_r, objects.classxmatch, objects.firstMJD
from probabilities
inner join objects
on probabilities.oid=objects.oid
where probabilities.sne_prob>0.7 and objects.classxmatch=%s
and objects.firstMJD > %s
''' % (classmapper["SNe"], 58744. - 100.)
SNe = pd.read_sql_query(query, conn)
SNe.set_index('oid', inplace=True)
SNe.head()
The text was updated successfully, but these errors were encountered: