-
Notifications
You must be signed in to change notification settings - Fork 18
feat: detect extrapolation for morphstretch
#258
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| **Added:** | ||
|
|
||
| * No news added: Add warning for extrapolation in morphstretch and tests for extrapolations. | ||
|
|
||
| **Changed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Deprecated:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Removed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Fixed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Security:** | ||
|
|
||
| * <news item> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| def create_morph_data_file( | ||
| data_dir_path, x_morph, y_morph, x_target, y_target | ||
| ): | ||
| morph_file = data_dir_path / "morph_data" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do these files end up having an extension? If they are text files maybe make them
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These files do not end with an extension. This helper function create these files in |
||
| morph_data_text = [ | ||
| str(x_morph[i]) + " " + str(y_morph[i]) for i in range(len(x_morph)) | ||
| ] | ||
| morph_data_text = "\n".join(morph_data_text) | ||
| morph_file.write_text(morph_data_text) | ||
| target_file = data_dir_path / "target_data" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
| target_data_text = [ | ||
| str(x_target[i]) + " " + str(y_target[i]) for i in range(len(x_target)) | ||
| ] | ||
| target_data_text = "\n".join(target_data_text) | ||
| target_file.write_text(target_data_text) | ||
| return morph_file, target_file | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create
helper.pyto contain reused functions.