J. Kissel, E. von Ries
- open a terminal
- $ ssh albert.einstein@opslogin0
- once on opslogin0, make sure the control room has the latest model parameter files, (see discussion of how good the latest model parameter set, pydarm_modelparams_PostO3_H1_20220527.ini, is in LHO:63450)
- : cd /ligo/gitcommon/Calibration/ifo/
- : git pull # See EDIT comment below
- activate the pydarm conda environment (following Erik's instructions in LHO:63338)
- : source /opt/rtcds/userapps/release/cds/h1/scripts/setup_anaconda
- : conda activate /opt/nonsens/conda/mambaforge/envs/nonsens
- : export PYTHONPATH=/opt/nonsens/nonsens:/opt/nonsens/pydarm
- run python, and import pydarm, and make a frequency vector
- : python3
- >>> import pydarm
- >>> import numpy as np
- >>> from matplotlib import pyplot as plt
- >>> freq = np.logspace(0,4,1000)
- generate the pydarm objects for each parts of the DARM loop
- >>> model_param_file = '/ligo/gitcommon/Calibration/ifo/pydarmparams/pydarm_modelparams_PostO3_H1_20220527.ini'
- >>> C_obj = pydarm.sensing.SensingModel(model_param_file) # See Evan's comment below
- >>> A_obj = pydarm.actuation.DARMActuationModel(model_param_file)
- >>> darm_obj = pydarm.darm.DARMModel(model_param_file)
- >>> darm_olgtf_tf = darm_obj.compute_darm_olg(freq)
- plot it
- >>> fig = plt.figure()
- >>> s1 = fig.add_subplot(211)
- >>> s2 = fig.add_subplot(212)
- >>> s1.loglog(freq,abs(darm_olgtf_tf))
- >>> s2.semilogx(freq,180.0/np.pi*np.angle(darm_olgtf_tf))
- >>> plt.show()
And you've got it! (Hopefully)
ALL THIS IS SUBJECT TO CHANGE.
EDIT:
during the "git pull" stage above, when I first sat down, I got the following error in the ifo repo checkout:
git@git.ligo.org: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Erik and Jonathan identified that this is because I didn't have a ssh key for the control room machines and/or this was a symptom of the way that the repo was cloned in this location.
While I have done the following to create an ssh key,
jeffrey.kissel@opslogin0:/ligo/gitcommon/Calibration/ifo$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/ligo/home/jeffrey.kissel/.ssh/id_rsa):
/ligo/home/jeffrey.kissel/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /ligo/home/jeffrey.kissel/.ssh/id_rsa.
Your public key has been saved in /ligo/home/jeffrey.kissel/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:XQnWdPoBVmHwdsX3i+qpeTvANGQHFiI7zTXFN1oF7ew jeffrey.kissel@opslogin0
The key's randomart image is:
+---[RSA 2048]----+
| . . *B+=+O+.|
| = ++.=.@ .+|
| o oo . B B +|
| . + o o =.|
| S o + .|
| o . E |
| . . |
| .+. |
| o++o |
+----[SHA256]-----+
jeffrey.kissel@opslogin0:/ligo/gitcommon/Calibration/ifo$ cat /ligo/home/jeffrey.kissel/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCebNagyBGRjYsoP4RT8KZ74HLONo6B4VOwBNUQpOPrNnMvQTD3NfTQJHWTgkcAFiCB2yLeioqJQmrigTd9BjnKx/1Eo4z1wvhC/hvCvD07IcvLgogP1lujyDyx7qYHBw46W1pFXXt1wqkFYFiDxcsNRgqhFqFBvdyVJdfPZs+GHqK8Df6AfKKZTWqrYgzpqYbvzl9q21E3vEUyTQamoftBimCZVSj1cz7+5W7giWBcBNmcuHzrV2/Af7pfzj8zoveXv/9qISyLKp0F4zlB52/lih9TzxTg36l8MCzIb2592xVsRaYtuxb8SA4Sst8bUqVvUFclj/rCD1ytEDfMvKyp jeffrey.kissel@opslogin0
Then I went to https://git.ligo.org/-/profile/keys, and copied the above public id_rsa.pub hash, into the "Key" field, then gave it a title something like "jeffrey.kissel@controlroom" with expiration date in the year 2080, and hit the blue "add key" button.
We realize this generation of a ssh key is pretty intractable for all folks to do. I imagine a future where many folks may be needing the latest and greatest model files that may be generated on some other computer than the shared control room directories at LHO (e.g. my laptop).
So, well after the above, this afternoon Erik and I changed the control room clone of the ifo repo, to use a web-address "remote" link to the repo rather than a git@git.ligo.org link (I **think** I'm using the right words...)
jeffrey.kissel@opslogin0:/ligo/gitcommon/Calibration/ifo$ git remote -v
origin git@git.ligo.org:Calibration/ifo.git (fetch)
origin git@git.ligo.org:Calibration/ifo.git (push)
jeffrey.kissel@opslogin0:/ligo/gitcommon/Calibration/ifo$ git remote set-url origin https://git.ligo.org/Calibration/ifo.git
jeffrey.kissel@opslogin0:/ligo/gitcommon/Calibration/ifo$ git remote -v
origin https://git.ligo.org/Calibration/ifo.git (fetch)
origin https://git.ligo.org/Calibration/ifo.git (push)
jeffrey.kissel@opslogin0:/ligo/gitcommon/Calibration/ifo$ git pull
Username for 'https://git.ligo.org': jeffrey.kissel
Password for 'https://jeffrey.kissel@git.ligo.org':
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://git.ligo.org/Calibration/ifo.git/' # Fails, because git.ligo.org uses your *git* username, which may not be your albert.einstein@ligo.org name!
jeffrey.kissel@opslogin0:/ligo/gitcommon/Calibration/ifo$ git pull
Username for 'https://git.ligo.org': jeffrey-kissel
Password for 'https://jeffrey-kissel@git.ligo.org':
Already up to date. # Success!
jeffrey.kissel@opslogin0:/ligo/gitcommon/Calibration/ifo$