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

feat: Added query_bsi #201

Merged
merged 3 commits into from
Nov 14, 2022
Merged

feat: Added query_bsi #201

merged 3 commits into from
Nov 14, 2022

Conversation

pabloitu
Copy link
Collaborator

@pabloitu pabloitu commented Sep 21, 2022

created function to query the Bollettino Sismico Italiano (BSI) webservices.rm.ingv.it. It is modified from the query comcat functions. Minor mods were done to cat_query functions to handle the different properties returned from bsi compared to comcat (e.g. event['id'] in comcat, event['properties']['eventId'] in bsi).

pyCSEP Pull Request Checklist

Type of change:

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Documentation update (this pull request adds no new code)
  • This change requires a documentation update

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

… from csep.__init__, wrapping the readers._query_bsi. This is based in csep.utils.comcat.search functions.

mods: (i) Exception catchs for Hostname mismatch in SSL verification (the bsi does not go through https). (ii) in comcat and bsi, ids are set different. SummaryEvent now handles this with try/except. (iii) bsi returns datetimes as utc strings, instead of timestamp as comcat.
…atalog_filtering

styl: modified query_comcat docstring
@codecov-commenter
Copy link

codecov-commenter commented Sep 21, 2022

Codecov Report

Base: 55.73% // Head: 55.17% // Decreases project coverage by -0.55% ⚠️

Coverage data is based on head (c1de400) compared to base (bb299b2).
Patch coverage: 19.67% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #201      +/-   ##
==========================================
- Coverage   55.73%   55.17%   -0.56%     
==========================================
  Files          20       20              
  Lines        3594     3652      +58     
  Branches      580      589       +9     
==========================================
+ Hits         2003     2015      +12     
- Misses       1466     1513      +47     
+ Partials      125      124       -1     
Impacted Files Coverage Δ
csep/__init__.py 28.98% <5.26%> (-3.79%) ⬇️
csep/utils/readers.py 46.44% <16.66%> (-0.54%) ⬇️
csep/utils/comcat.py 83.74% <27.77%> (-2.85%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

… bottom level. default=1000. Maybe these functions should have the arguments to completely define an experiment catalog (perhaps just max_mag and its ready)
@wsavran
Copy link
Collaborator

wsavran commented Sep 23, 2022

cool, will include this in the v0.6.1 release!

@wsavran wsavran changed the base branch from master to v0.6.1-release-branch November 14, 2022 18:55
@wsavran wsavran merged commit 55f3abd into SCECcode:v0.6.1-release-branch Nov 14, 2022
wsavran added a commit that referenced this pull request Dec 12, 2022
* Quadtree csv reader (#186)
* New plotting routines (#190)
* Non poissonian tests (#189, #202, #205, #208, #209)
* Fix region border plot (#199)
* Added support for BSI catalog (#201)
* Fix consistency plots (#206)
@pabloitu pabloitu deleted the bsi branch August 16, 2024 13:29
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

Successfully merging this pull request may close these issues.

3 participants