Skip to content

Conversation

@hmaarrfk
Copy link
Collaborator

I don't know if this is a good idea.

Added support for direct access to the numpy array. Before the array
would be a ctype, then cast as a list, then as a numpy array. This was
slow. You can do the whole thing in numpy.

More consistent parameter return values as tuples and not lists (I think
it makes more sense).

I don't know if this is a good idea.

Added support for direct access to the numpy array. Before the array
would be a ctype, then cast as a list, then as a numpy array. This was
slow. You can do the whole thing in numpy.

More consistent parameter return values as tuples and not lists (I think
it makes more sense).
@hmaarrfk
Copy link
Collaborator Author

Hi,

I was just about to start working on the same thing when I noticed your started code on github.

I'm not working on a Windows computer right now, but what I did should be OK across windows.

I think the only line that might give trouble is the clib line, you had it a winlib in ps6000.py

I'll probably add some AWG code soon.

Mark

As well as the getTimebase function.

The getTimebase now returns two things, the raw timebase number required
by the picoscope, and a human readible time interval.

This used by the setSampling interval function to compute the total
number of samples needed. It returns this to the user.

Gah, the setSigGenBuiltIn function is messed up, and doesn't really
work. I will have to followup on the bug report I posted earlier.
Also fixed some other bugs
@colinoflynn
Copy link
Owner

Excellent - thanks for the ideas! Will merge in. Only comment is in the return types for data like (data, numSamplesReturned, overflow), is numSampleReturned required? My thought on being more 'pythonic' would be to make the returned array only the length of the valid data. However I'm far from an expert on Python, so 50% of this is 'gut feeling'.

colinoflynn added a commit that referenced this pull request Dec 24, 2013
Reorganized the code into two different files.
@colinoflynn colinoflynn merged commit 8ba86e9 into colinoflynn:master Dec 24, 2013
@colinoflynn
Copy link
Owner

Hi Mark,

I added you as a collaborator which I think gives you write access. I'm new to github (I usually use Assembla, but wanted to try out this service as it seems popular), so let me know if you don't have access.

There doesn't seem to be a mailing list or similar so maybe I'll start an issue tracker & can discuss any other changes quick?

-Colin

@colinoflynn
Copy link
Owner

Rethought my comment on if "is numSampleReturned required". Perhaps it would be useful to keep, as in the future may want to always allocate one buffer, and not have to keep reallocating it every time you get new data. Thus you wouldn't want to chop down the size of it in the return... what do you think?

hmaarrfk pushed a commit that referenced this pull request Apr 23, 2024
…FromTimebase

Bugfix/picoscope 4444 get timestep from timebase
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.

2 participants