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

Cleaning filter data from strings and empty datasets before using it #18

Closed
wants to merge 2 commits into from

Conversation

jaladh-singhal
Copy link
Member

This resolves error in loading filters that were failing due to presence of garbage strings in data fetched from hdf file (i.e. part-1 in problems mentioned in issue#13). The data filter dataframe is cleaned before it is used in load_filter() function.

As explained in comment on issue#13: starkit#13 (comment), this cleans those filters from filter_index that have empty filter dataset (dataframe).
@jaladh-singhal
Copy link
Member Author

These both commits fix all the problems (Garbage Strings + Empty dataframes) in parsing filters from current HDF file wsynphot is using. I've tested this by using notebook that allows user to make arbitrary selection of facility & instrument (by dropdowns).

@jaladh-singhal jaladh-singhal changed the title Cleaning filter data from strings before using it Cleaning filter data from strings and empty datasets before using it May 28, 2019
@wkerzendorf
Copy link
Member

I think it's better if we have all of that in the ingesting method rather than on load.

@@ -79,6 +90,20 @@ def list_filters():

return get_filter_index()

#To check whether both passed strings are float or not
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try it and if it raises ValueError just leave that ValueError through

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually its purpose is for cleaning the data. It returns boolean for each element in dataframe because we need a series to clean the data by boolean indexing.

It might appear confusing here, it will become clear in new PR I'm creating.

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.

None yet

2 participants