pyepics / newportxps

python support code for NewportXPS drivers
BSD 2-Clause "Simplified" License
20 stars 17 forks source link

About this repo #17

Closed josephernest closed 1 year ago

josephernest commented 1 year ago

Hello,

Thanks for making the newportxps package available! Just a few questions:

Thanks again!

newville commented 1 year ago

@josephernest

is this the main repo for newportxps or is it a fork of another library? I guess you're the author of this library @newville?

Well, git is inherently distributed, so "main" is in the eye of the beholder. ;) I use this repository as the "main branch" (and use this code in production at my X-ray beamline). Apparently, other people use this too ;). And, yes, I am the main author, though there have been significant contributions from others. It might be called a classic open-source repo: use as you like, we're happy to help out, you might get some help here, we sort of expect everyone to be an adult, using Python, has a Newport XPS, and that no one truly "owns this".

Newport Corp. has provided a basic socket and ftp interface to the XPS controller for a long time, this interface is very low-level

Yes, there are FTP and socket-based interfaces. The Python code here uses both: socket calls to the API to move axes, run trajectories, etc, and FTP to up/download configuration files to the controller.

I'm not sure I have this document. Would you have a link to the basic socket and ftp interface documentation ? If you don't have the link, would you have the .PDF filename? (Maybe I can find it)

I think the easiest way to get the documentation is through the web interface to a controller. Most of them are also on the Newport web site. Note that there are some differences between generations in the socket calls (mostly backward-compatible) and the "FTP" interface -- the XPS-D uses SFTP, for example.

how does newportxps compare to the .net interface (using pythonnet) using the official .DLL coming with Newport.XPS.CommandInterface_x64.msi?

I don't know. I might guess that a Python wrapping of the .NET interface would look very much like the low- (or perhaps "mid-") level socket calls as in the XPS API. FWIW, I mostly use this Python code from Linux, but sometimes from Windows, so .NET through a shared library that makes socket calls would be somewhat more painful than just making socket calls. If someone wanted to reproduce the interface here to .NET, I would say "go for it".

I only see in https://github.com/pyepics/newportxps/tree/master/newportxps the model XPS_C8. Does this mean the XPS-D8 and XPS-RLD8 are unsupported by this library?

XPS-C, XPS-Q, and XPS-D are all supported (and I use all of them in production). I have never used (or actually seen) an RLD. I guess it would work, or at worst need a few small changes to make work. That said, it is possible that some newly added socket-level features are not fully supported. I think it would not be too hard to fix those as they are discovered.

josephernest commented 1 year ago

Thanks for your answer ! Perfect !