-
Notifications
You must be signed in to change notification settings - Fork 18
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
Setting trajectory group #5
Comments
@hududed It looks to me like you have an XYGroup defined but not a MultipleAxes group defined. Currently, this newportxps module doesn't support trajectory scans with XYGroups, but only supports PVT trajectories with MultipleAxes groups. I have used XYGroups in the distant past, and recall that there were some subtle differences, but I don't recall the details. So, in principle, support for this this could be added, I just have not needed that and don't have one of those set up at the moment. The simplest thing would be to switch from XYGroup to MultipleAxesGroup. In fact, it looks like you want to do a trajectory with your 'Z-MFA' stage, which is a single-axis group and cannot (I believe) do trajectories. [aside: with one of the XPSes I use for trajectory scans, almost all the trajectories are really along one axis at a time, but it might be one of two or 3 axes, and on rare occasions, I do diagonal scans. With other XPSes, we really do more complex trajectories where only PVT makes sense]. So, perhaps you want to switch to a system.ini that puts any axis that you will want to do a trajectory with into a MultiAxes group, something like this (totally writing this on the fly!!):
with that, you could define complex trajectories in x, y, z, or just scan along one axis. Does that make sense and seem like a reasonable approach? Also: you will have to home and initialize the groups before you can run a trajectory ;). FWIW, if you're committed to using the XYGroup approach, I don't think it would be that hard to alter this code to support that. |
@newville the XYZ multiple axes works thank you.
Now I get a file not found error when defining the trajectory:
So there are foreward and backward .trj files preloaded on my system |
@hududed That traceback says the problem is when the (S)FTP instance tries to set the current working directory to
so you might want to investigate that. Can you manually use the ~> sftp Administrator@YOUR_XPS_IPADDRESS From there, you should be able to do It still seems to me like something is not set up correctly with sftp between your workstation and XPS controller. |
@newville I can confirm the data are there
|
Um, why do the filenames have "x" in them? |
They are preloaded that way. Do you have a simple working trajectory file example that I can test with the code? |
The files 'forewardx.trj' and 'backwardx.trj' are not uploaded by this module. The files uploaded here should be named 'foreward.trj' and 'backward.trj'. I suspect that you are not able to write to this Trajectories folder, though I don't know why that would be the case. A simple working trajectory file for a 3-axis group would be
A simple script to define and run a trajectory might be
But, again, I think the problem you were having was with sftp. |
@newville So, if I understand this correctly.
basically writes I used the sftp directly in the notebook as how I have it modified in
I also double-checked to see I have full read/write permissions and that the text file is there through the command line:
It seems I have the permissions fine. The upload is written through
|
So I think the problem is the backlash in Windows. Since I am running on windows I replaced the
So now if I run:
Am I missing something? |
Hm, OK not sure... it was failing in Python when setting the working directory in sftp.
Oh, good catch - it should be the second version to ensure that there is a trailing new line.
Ah, that makes more sense. Bitten by "os.path.join()" again (well, and the damn Windows backslash!). Right, the path is on the sftp server, not on the client-side. So we should fix it the code to force forward slashes, as with your replace().
Not sure. Is your |
@newville pardon my ignorance. I didn't home the stages. It's working now! |
@hududed Great! Glad to hear it's working. OK, so I think the main action items here are: a) fix the path joining to force forward slashes. Does that seem right and complete to you? Any more suggestions on making this more user friendly (like, maybe more informative error messages)? |
Sounds about right. Maybe extend an example with just necessary steps to make it run. So far for me something like this:
Thanks again and feel free to close this comment. |
@hududed OK, I think these are now fixed in v 0.2 |
Hi @newville
I am trying to set a simple line trajectory.
I have the axes set as such:
If I try to define the line trajectory for group Z:
If I set the trajectory group I get the error:
How do I properly set the trajectory group?
The text was updated successfully, but these errors were encountered: