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

check for benchmark data #27

Open
jmjech opened this issue Dec 6, 2024 · 3 comments
Open

check for benchmark data #27

jmjech opened this issue Dec 6, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@jmjech
Copy link
Collaborator

jmjech commented Dec 6, 2024

An inelegant error is raised (i.e., I get about 50 lines of error messages that I need to sift through) if I attempt to get benchmark data from a sphere type that doesn't have benchmark data. A feature request is to provide a "nicer" error message that no benchmark data are available for that sphere type.

@gavinmacaulay
Copy link
Collaborator

gavinmacaulay commented Dec 6, 2024

Can you give some example code and the resulting error messages? I tried what I think you mean and only get about 20 lines of errors, so perhaps not the same stuff as you saw?

@jmjech
Copy link
Collaborator Author

jmjech commented Dec 6, 2024

I can't recreate the error message now as I've rewritten the code and mapped reference model names with the benchmark data column names in a dictionary and do a check for the data. If I run into this again I'll let you know. It may not have been 50, but it was more than 20. You can close this until I can recreate it.

I am running into another issue with the version, but I'm trying to figure out if it is on my end. I wasn't able to run the "theoretical_Sa" function because it couldn't be found. I used your version (importlib) trick and found that I am using 0.1.8, even though I've just reinstalled echosms this afternoon and it seems that 0.5.? was installed via pipx. I'll get back to you on that one if I need to with a new issue.

@gavinmacaulay
Copy link
Collaborator

I used:

from echosms import BenchmarkData
bm = BenchmarkData()
bm.freq_dataset['abcd']

and got 20 odd lines of stack trace and error. freq_dataset is a Pandas dataframe, so everything is coming from Pandas code, not echoSMs. However, I see now that that is not necessarily clear and it might be better to return the requested benchmark data (and then echoSMs can generate simpler errors) and also have an as_dataframe() method for when one wants all the benchmark datasets.

@gavinmacaulay gavinmacaulay added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants