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

Snuffling Quick Save #25

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Snuffling Quick Save #25

wants to merge 7 commits into from

Conversation

grajh
Copy link

@grajh grajh commented Jul 15, 2018

Hi!

For my needs I wrote a snuffling, which allows me to save markers more efficiently (predefined folder) and based on the name of an active event.

I guess some else could also benefit from it.

screenshot from 2018-07-15 12-05-14

Gregor

Copy link
Member

@miili miili left a comment

Choose a reason for hiding this comment

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

Thank for this feature! :)

I made some minor suggestions to the code, also @HerrMuellerluedenscheid should have a look.

quick_save.py Outdated

# TO-DO - save to VELEST format.

user_def_root_folder = \
Copy link
Member

Choose a reason for hiding this comment

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

Capitalize this constant and default to the user's home folder: os.path.expanduser('~')

Copy link
Author

Choose a reason for hiding this comment

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

Done.

quick_save.py Outdated
def __snufflings__():
"""Returns a list of snufflings to be exported by this module."""

return[QuickSave()]
Copy link
Member

Choose a reason for hiding this comment

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

Add newline at EOF

Copy link
Author

Choose a reason for hiding this comment

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

I noticed that empty lines at EOF are automatically truncated.

Copy link
Author

Choose a reason for hiding this comment

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

Now it worked. It was editor's fault.

@grajh
Copy link
Author

grajh commented Jul 15, 2018

Good. I will wait for additional comments and then apply the proposed changes.

Gregor

quick_save.py Outdated
@@ -225,5 +222,5 @@ def call(self):
def __snufflings__():
"""Returns a list of snufflings to be exported by this module."""

return[QuickSave()]
return[ QuickSave() ]
Copy link
Member

Choose a reason for hiding this comment

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

missing whitespace, please remove the added white spaces again. this does not follow pep8 ...

@HerrMuellerluedenscheid
Copy link
Member

Hey @grajh

After quite some time I had a quick look again into your source code. Do I get it right that this snuffling is saving markers in a format that is suitable for the inversion tool Velest?
Would it be possible to extend the snuffling to be able to call Velest right from the snuffling? How did you call it? Do you have a python wrapper or something alike?
I think this would be a really nice feature!!

@grajh
Copy link
Author

grajh commented Mar 20, 2019

Hi!

Yes, this is basically it. Till now i just oppened terminal and run it separately.
Suppose user has VELEST source code somewhere I could make a Python wrapper which would allow you to prepare control (parameter) file and easily run VELEST source code from inside Snuffler (separate windows would open in text editor and terminal respectively). It would mean that user would have to put VELEST source code inside Snuffling's own directory or provide absolute path to it. I am not sure if VELEST source code can be distributed along Snuffling though. One more thing. Because VELEST needs FORTRAN compiler to run, an automatic install could be initiated in case the compiler is not already present.

One more thing comes to my mind for the future. I could also implement a procedure which would allow to read already existing VELEST file and merge it with current picks by overwriting or adding picks to existing file. This functionality could be merged with default marker opening procedure in Snuffler.

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.

4 participants