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

[Minor annoyance] Program requires a trace to be open to use the stf.new_window* commands #20

Closed
AndrewMicallef opened this Issue Jun 13, 2015 · 7 comments

Comments

Projects
None yet
2 participants
@AndrewMicallef
Contributor

AndrewMicallef commented Jun 13, 2015

Hi,
I've come back to using stimfit for analysing binary data from an unsupported format. The format my data is in comes from a series of macros written for Igor a long time ago. Basically I'm dealing with one giant file of binary data, which has meta information stored as plain text in a log file (number of sweeps, sweep duration, sampling interval etc.).

I've written a parser, which reads the plain txt and then applies the relevant stimfit set commands. I then read the binary into a np array with a function that creates a 2d array (number of sweeps x sweep length).

I then have the parser put the np array into the stimfit gui window using stf.new_window_matrix(np.array). Stimfit then responds to say there is no open file. If I open some unrelated file and then run my parser it all works, so my work flow now looks something like this:

  1. open some file I don't care about
  2. parse my archaic data
  3. close the file I don't care about
  4. have a coffee because 1-3 were such hard work

Also I've tested all variants of the stf.new_window function, making the appropriate reorganisations to the preceding functions.

@AndrewMicallef AndrewMicallef changed the title from [Minor annoyance] Program requires a trace to b open to use the stf.new_window* commands to [Minor annoyance] Program requires a trace to be open to use the stf.new_window* commands Jun 13, 2015

@neurodroid

This comment has been minimized.

Show comment
Hide comment
@neurodroid

neurodroid Jun 14, 2015

Owner

It's a feature to encourage coffee consumption.
Which OS are you using?

Owner

neurodroid commented Jun 14, 2015

It's a feature to encourage coffee consumption.
Which OS are you using?

@AndrewMicallef

This comment has been minimized.

Show comment
Hide comment
@AndrewMicallef

AndrewMicallef Jun 15, 2015

Contributor

My local cafe thinks this particular undocumented feature is great.

So I'm using Stimfit 0.14.10 on a windows 8 machine.

I updated the parser I'm using so that it automates the process of opening a blank file, processing my data, then switching to the blank file and closing it.

Although practicality beats purity. -Tim Peters

Contributor

AndrewMicallef commented Jun 15, 2015

My local cafe thinks this particular undocumented feature is great.

So I'm using Stimfit 0.14.10 on a windows 8 machine.

I updated the parser I'm using so that it automates the process of opening a blank file, processing my data, then switching to the blank file and closing it.

Although practicality beats purity. -Tim Peters

@AndrewMicallef

This comment has been minimized.

Show comment
Hide comment
@AndrewMicallef

AndrewMicallef Jun 16, 2015

Contributor

Although it would be kinda neat if I could get this sort of thing happening. Ie have python attempt to make a new window, if it fails, to the open up my dummy file and make the new window without bothering me with a pop-up window to tell me that it can't find an open file.

#for completeness
v = np.random.rand(3,2)

try:
    stf.new_window_matrix(v)
except:
    stf.file_open(dummy_file)

At the moment the above code returns False if you run it in a new stimfit session

False
Contributor

AndrewMicallef commented Jun 16, 2015

Although it would be kinda neat if I could get this sort of thing happening. Ie have python attempt to make a new window, if it fails, to the open up my dummy file and make the new window without bothering me with a pop-up window to tell me that it can't find an open file.

#for completeness
v = np.random.rand(3,2)

try:
    stf.new_window_matrix(v)
except:
    stf.file_open(dummy_file)

At the moment the above code returns False if you run it in a new stimfit session

False
@neurodroid

This comment has been minimized.

Show comment
Hide comment
@neurodroid

neurodroid Jun 16, 2015

Owner

05a00a3, mentioned above, should fix this issue, but I'm not sure when I will have time to build a new Windows version.

Owner

neurodroid commented Jun 16, 2015

05a00a3, mentioned above, should fix this issue, but I'm not sure when I will have time to build a new Windows version.

@neurodroid

This comment has been minimized.

Show comment
Hide comment
@neurodroid

neurodroid Jun 21, 2015

Owner

Let me know if v0.14.11 fixes your problem so that I can close this issue.

Owner

neurodroid commented Jun 21, 2015

Let me know if v0.14.11 fixes your problem so that I can close this issue.

@AndrewMicallef

This comment has been minimized.

Show comment
Hide comment
@AndrewMicallef

AndrewMicallef Jun 23, 2015

Contributor

I can confirm that this works on Windows 8.
Thank you so much.

There is a coffee shop on campus that may go into liquidation now :)

Contributor

AndrewMicallef commented Jun 23, 2015

I can confirm that this works on Windows 8.
Thank you so much.

There is a coffee shop on campus that may go into liquidation now :)

@neurodroid

This comment has been minimized.

Show comment
Hide comment
@neurodroid

neurodroid Jun 23, 2015

Owner

Don't worry - the program has some more undocumented "features" that will keep them in business.

Owner

neurodroid commented Jun 23, 2015

Don't worry - the program has some more undocumented "features" that will keep them in business.

@neurodroid neurodroid closed this Jun 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment