Remote Measurements

Experiments at PolLux can now be controlled via the internet. You can launch scans, watch the pixels come in and download data-files to your local computer for analysis - all from the comfort of home! No airports, no hotels, no access badge needed.

You will need:

  • Scheduled beamtime at PolLux (usually granted through proposals).
  • Your e-account number (e.g. e18320) that is emailed to the main proposer and can also be found in DUO.
  • A PSI "external account", which will have "ext-" at the beginning of the username. The beamline manager will need to request this account, so you should poke your beamline contact if you don't receive an email asking you to activate your external account, or if there is anyone not listed on the proposal who should be given remote access during the beamtime.

We have a media tablet at the beamline for videoconferencing with whoever is running the experiments. Most systems are available (e.g. Zoom, Skype, Google Hangouts/Meetings) and the preferred method should be discussed with your local beamline contact.

Download and install NoMachine, then follow these instructions to connect to rem-acc.psi.ch.

Finally, you will want to connect to X07DA_POLLUX_console_x07da-cons-1, where the PolLux instrument control software can be operated. Note that when you are asked about the "Display resolution", you should uncheck the option to "Change the server resolution...". This is important because changing the resolution causes all kinds of strange behaviour. If you mess this up, you can fix it in the options. While connected:

  1. Enter into the options menu by either pressing ctrl+alt+0, or move the mouse to the top-right corner and click on the curled page.
  2. Choose the "Display" options.
  3. Choose to "Change settings".
  4. Uncheck the option to "Match the client resolution upon connecting"
  5. Click the "Done" button three times to exit the options menu.

Since the beamline console has two monitors attached to it, another useful option to adjust in the NoMachine "Display" settings is to set the "Change Monitor" to "All", as illustrated here.

In order to be able to quickly update your local copy of the e-account data without having to re-download all the files you already have, we use a program called "rsync" that first compares the local and remote versions before downloading only the files that are new or changed. The rsync program is distributed with the Apple and Linux operating systems, but a few extra steps are required on Windows.

Apple/Linux

  1. Open a command line terminal.
  2. Change directory to where you want the local copy of the e-account.
  3. Execute:
    rsync -r -P EXT-ACCOUNT@ra-export.psi.ch:/sls/X07DA/Data1/e##### .
    replacing EXT-ACCOUNT with your PSI-external username and e##### with your e-account number. The space and dot at the end says to place the local copy in the current directory.
  4. The first time you run it, you will get a message that the authenticity of the server can't be established and asking if you want to continue. If you are not super-paranoid, then type "yes" and hit enter.
  5. Type your DUO password when asked.
  6. Wait for the data to download. (Before the measurements start, there will only be the base directory to download.)

 

To update your copy of the e-account data, run the same again (and enter your password). The program will look at the differences between your copy and the one at PSI and then only transmit the parts you are missing, so you don't need to worry about running it too often.

Rsync for Windows

Download the free version of cwRsync from:

    1.  Go to https://itefix.net/cwrsync
    2. Click on the "Rsync client" tab
    3. Download the zip file
  1. Unzip the contents in the directory where you want to download the e-account data.
  2. Open cwrsync.cmd in a text editor (e.g. right click on the file and choose "edit").
  3. Add the following to a new line at the bottom of the file:
    rsync -r -P EXT-ACCOUNT@ra-export.psi.ch:/sls/X07DA/Data1/e##### .
    (make sure the space and dot at the end are included, and make sure it is the only text on that line of the file)
  4. Replace EXT-ACCOUNT with your external account name and e##### with your e-account name.
  5. Save the file (and close the editor if you are confident you got it all correct).
  6. Run cwrsync.cmd, either by double-clicking it in explorer, or by opening a command prompt, cd-ing to the directory containing cwrsync.cmd and then executing it.
  7. The first time you run it, you will get a message that the authenticity of the server can't be established and asking if you want to continue. If you are not super-paranoid, then type "yes" and hit enter.
  8. Type your DUO password when asked.
  9. Wait for the data to download. (Before the measurements start, there will only be the base directory to download.)

 

To update your copy of the e-account data, run cwrsync.cmd again (and enter your password). The program will look at the differences between your copy and the one at PSI and then only transmit the parts you are missing, so you don't need to worry about running it too often.

 

Advanced users could copy the contents of the bin directory somewhere central and add them to the system PATH for a "nicer" installation, but the program will want to be able to create some directories and files for storing known host details (look at what the code in cwrsync.cmd does) and it is probably more effort than it is worth.