pygwinc issueshttps://git.ligo.org/gwinc/pygwinc/-/issues2024-03-27T22:33:52Zhttps://git.ligo.org/gwinc/pygwinc/-/issues/109SuspensionThermal horizontal test mass trace name2024-03-27T22:33:52ZKevin KunsSuspensionThermal horizontal test mass trace nameThe trace name is now `HorizTest mass` instead of `HorizTM`, which is especially annoying because of the space. I think that got messed up in !153.The trace name is now `HorizTest mass` instead of `HorizTM`, which is especially annoying because of the space. I think that got messed up in !153.Kevin KunsKevin Kunshttps://git.ligo.org/gwinc/pygwinc/-/issues/113ci for making releases on pypi and conda-forge is broken2024-03-04T22:53:58ZKevin Kunsci for making releases on pypi and conda-forge is brokenThis may be more of a problem with pypi itself, but the ci to make a new release when a version tag is pushed is broken. See for example
https://git.ligo.org/gwinc/pygwinc/-/jobs/3192368
It looks like the failure has something to do wi...This may be more of a problem with pypi itself, but the ci to make a new release when a version tag is pushed is broken. See for example
https://git.ligo.org/gwinc/pygwinc/-/jobs/3192368
It looks like the failure has something to do with trying to push a version that already exists on pypi (0.5.1 in the above example, see [here](https://git.ligo.org/gwinc/pygwinc/-/jobs/3192368#L418)) even though it's trying to push 0.5.2 (see [line 22](https://git.ligo.org/gwinc/pygwinc/-/jobs/3192368#L22) of the log). I tried pushing the tag for 0.5.1 last night, and it failed for the same reason. I tried rerunning the pipeline (there were a few instances last night where pipelines just had to be rerun) and it failed. Thinking that something may have gotten partially pushed somehow, I tried pushing 0.5.2 instead. The last release on pypi is also allegedly only 0.5.0.
https://pypi.org/project/gwinc/#historyJameson Rollinsjameson.rollins@ligo.orgJameson Rollinsjameson.rollins@ligo.orghttps://git.ligo.org/gwinc/pygwinc/-/issues/112gwinc interactive mode broken on ipython 8.11+2024-03-04T16:51:25ZChristopher Wipfgwinc interactive mode broken on ipython 8.11+Looks like the workaround from [this ipython bug](https://github.com/ipython/ipython/issues/13966) is needed.Looks like the workaround from [this ipython bug](https://github.com/ipython/ipython/issues/13966) is needed.https://git.ligo.org/gwinc/pygwinc/-/issues/65BudgetItem's with kwargs2022-03-28T02:22:41ZKevin KunsBudgetItem's with kwargsIt looks like `nb.BudgetItem`'s can be defined with keyword arguments, but it seems to me that a frequency vector either needs to be given or already exist. See [here](https://git.ligo.org/gwinc/pygwinc/-/blob/master/gwinc/nb.py#L55). So...It looks like `nb.BudgetItem`'s can be defined with keyword arguments, but it seems to me that a frequency vector either needs to be given or already exist. See [here](https://git.ligo.org/gwinc/pygwinc/-/blob/master/gwinc/nb.py#L55). So I'm wondering how to define `nb.BudgetItem`'s with keyword arguments within a larger `nb.Budget`. The fact that `freq` doesn't yet exist seems to be a problem.
For a simple example, say you want to make a noise budget that's just a bunch of power laws. If the `nb.BudgetItem` initialization didn't require `freq` to either be given or already exist, then I think the following would work
```python
class PowerLaw(nb.Noise):
def calc(self):
return self.coeff * self.freq**self.power
class TestIFO(nb.Budget):
noises = [
PowerLaw(power=-1, coeff=2),
PowerLaw(power=-2, coeff=3)
]
```
But doing so results in
```
AttributeError: Frequency array not provided or defined.
```
Keywords can be defined after a BudgetItem has been defined, see [here](https://git.ligo.org/gwinc/pygwinc/-/blob/master/gwinc/nb.py#L34), so as a test the following works
```python
class PowerLaw2(nb.Noise):
def calc(self):
self.update(power=-2, coeff=3)
return self.coeff * self.freq**self.power
class TestIFO(nb.Budget):
noises = [
PowerLaw2
]
```
However, the following
```python
class TestIFO(nb.Budget):
noises = [
PowerLaw
]
def __init__(self):
self.noises[0].update(power=-2, coeff=3)
```
results in
```
TypeError: __init__() takes 1 positional argument but 2 were given
```
Just as further tests to figure out how to do this, both of the following
```python
class PowerLaw3(nb.Noise):
def __init__(self):
self.update(power=-2, coeff=3)
def calc(self):
return self.coeff * self.freq**self.power
class PowerLaw4(nb.Noise):
def __init__(self):
setattr(self, power, -2)
setattr(self, coeff, 3)
def calc(self):
return self.coeff * self.freq**self.power
```
result in
```
TypeError: __init__() got an unexpected keyword argument 'freq'
```
So how would you make a noise budget that's a bunch of power laws without defining a new `nb.Noise` for each one by hand?https://git.ligo.org/gwinc/pygwinc/-/issues/52Beam spot sizes are wrong for Advanced LIGO2021-10-19T19:54:03ZChristopher WipfBeam spot sizes are wrong for Advanced LIGO@gabriele-vajente writes:
> looking at the pygwinc code to compute thermal noise, I noticed that the beam spot sizes are wrong for Advanced LIGO.
> It looks like the RoCs of ITMs and ETMs are wrong.
>
> From https://git.ligo.org/gwinc/py...@gabriele-vajente writes:
> looking at the pygwinc code to compute thermal noise, I noticed that the beam spot sizes are wrong for Advanced LIGO.
> It looks like the RoCs of ITMs and ETMs are wrong.
>
> From https://git.ligo.org/gwinc/pygwinc/blob/master/gwinc/ifo/aLIGO/ifo.yaml:
> * ITM = 1970 m
> * ETM = 2192 m
>
> but from design and measurements the right numbers are
> * ITM = 1934 m
> * ETM = 2245 m
>
> This results in the beam size on the ITM to be wrong: pygwinc uses 55mm, while the actual number is 53mmFirst proper releasehttps://git.ligo.org/gwinc/pygwinc/-/issues/63Residual Gas2021-10-06T14:27:56ZRana AdhikariResidual GasThis is partly related to the #51, but more specifially, I'm wondering how to include **multiple molecular species**.
We want to have H20, N2, O2, and H2 at least. Since they each have different *masses* and *polarizabilities* and *part...This is partly related to the #51, but more specifially, I'm wondering how to include **multiple molecular species**.
We want to have H20, N2, O2, and H2 at least. Since they each have different *masses* and *polarizabilities* and *partial pressures*, they will each have a different curve (different DC level and different rolloff frequency).
Later on down the road, we probably also want to include the partial pressure for each species as a function of position along the beam tube, since the beam size changes as a function of position within the cavities.
I'd recommend using a separate field for the pressure for squeeze film damping since that is more likely sourced by outgassing near the mirror and would *not* effect the usual residual gas phase noise.0.3 releaseKevin KunsKevin Kuns2020-08-29https://git.ligo.org/gwinc/pygwinc/-/issues/94Incorrect results with calibrations in sub-budgets2021-03-29T22:57:31ZChristopher WipfIncorrect results with calibrations in sub-budgetsHere is a test case involving calibrations and sub-budgets:
```python
from gwinc import nb
from numpy import ones_like
class C1(nb.Calibration):
def calc(self):
return 900*ones_like(self.freq)
class C2(nb.Calibration):
...Here is a test case involving calibrations and sub-budgets:
```python
from gwinc import nb
from numpy import ones_like
class C1(nb.Calibration):
def calc(self):
return 900*ones_like(self.freq)
class C2(nb.Calibration):
def calc(self):
return ones_like(self.freq)
class N1(nb.Noise):
def calc(self):
return ones_like(self.freq)
class N2(nb.Noise):
def calc(self):
return 4*ones_like(self.freq)
class SB(nb.Budget):
noises = [(N1, C1), N2]
class B(nb.Budget):
noises = [ SB, ]
calibrations = [ C2, ]
```
Save as `B/__init__.py`, run as python3 -m gwinc B SB.
Expected result: noises `N1` and `N2` both have magnitudes near 1/rtHz. But `N1` is calibrated with `C1` which applies a large multiplicative factor, so it should dwarf `N2` in the sub-budget plot.
Actual result: apparently `C1` is applied to both `N1` and `N2`?
![SB](/uploads/8235835ea25da4d848509f76b5d8ee0a/SB.png)
However, you do get a correct result if you comment out the calibration `C2` in the parent budget.Christopher WipfChristopher Wipfhttps://git.ligo.org/gwinc/pygwinc/-/issues/93Quantum Noise h_SQL should be defined in terms of sustf.tst_suscept2021-03-01T18:05:18ZLee McCullerQuantum Noise h_SQL should be defined in terms of sustf.tst_susceptNow that the radiation pressure is properly calculated from the testmass susceptibility, the SQL factor used should not be the analytical value calculated under the free mass assumption.
line 300 from quantum.py should go from
`h_SQL = ...Now that the radiation pressure is properly calculated from the testmass susceptibility, the SQL factor used should not be the analytical value calculated under the free mass assumption.
line 300 from quantum.py should go from
`h_SQL = sqrt(8 * hbar / (m * (Omega * L)**2)) # SQL Strain`
to
`h_SQL = sqrt(8 * hbar / L**2 * abs(sustf.tst_suscept)) # SQL Strain`
It's a pretty small adjustment to the noise, only about .2% around 10Hz in the aplus model. I'd like this since A) it is correct and B) quantum code I'm working on needs correct comparisons.Kevin KunsKevin Kunshttps://git.ligo.org/gwinc/pygwinc/-/issues/82cli to plot specific sub budget2021-02-24T01:00:23ZJameson Rollinsjameson.rollins@ligo.orgcli to plot specific sub budgetThere should be a way to plot a specific sub-budget (e.g. Aplus.QuantumVacuum).
I think this can be solved together with #70There should be a way to plot a specific sub-budget (e.g. Aplus.QuantumVacuum).
I think this can be solved together with #700.3 releaseJameson Rollinsjameson.rollins@ligo.orgJameson Rollinsjameson.rollins@ligo.orghttps://git.ligo.org/gwinc/pygwinc/-/issues/70load_budget requires that budget modules include Budget class with the same name2021-02-24T01:00:22ZJameson Rollinsjameson.rollins@ligo.orgload_budget requires that budget modules include Budget class with the same nameThis is annoying, since it makes renaming things cumbersome.
Maybe we can assume a generic name for the top-level Budget class, or provide a way to specify it.This is annoying, since it makes renaming things cumbersome.
Maybe we can assume a generic name for the top-level Budget class, or provide a way to specify it.0.3 releaseJameson Rollinsjameson.rollins@ligo.orgJameson Rollinsjameson.rollins@ligo.orghttps://git.ligo.org/gwinc/pygwinc/-/issues/91Substraight Thermo-Elastic: what does it all mean?2021-02-01T20:05:03ZRana AdhikariSubstraight Thermo-Elastic: what does it all mean?in substratethermal.py, is the thermo-elastic noise for the reflection off of the HR surface only? Or does it include the transmission through the ITM?
Because, if we need to consider the thermo-refractive noise of the ITM (which we do ...in substratethermal.py, is the thermo-elastic noise for the reflection off of the HR surface only? Or does it include the transmission through the ITM?
Because, if we need to consider the thermo-refractive noise of the ITM (which we do do), then it seems like there should be some thermo-optic quantity for that, that coherently combines the TR+TE to get TO.
In the case where the arm cavity finesse is *very high*, the ITM bulk effects would be small for DARM, but would be significant for SRCL, but gwinc doesn't care about SRCL yet.2021-05-03https://git.ligo.org/gwinc/pygwinc/-/issues/86bug in CI dist pipeline2021-01-12T22:11:06ZKevin Kunsbug in CI dist pipelineIt looks like there's a bug in the CI dist pipeline now. The pipelines for the last two merge requests (!119 and !120) are failing here now.It looks like there's a bug in the CI dist pipeline now. The pipelines for the last two merge requests (!119 and !120) are failing here now.https://git.ligo.org/gwinc/pygwinc/-/issues/87Beam size for thermal noise calculations2021-01-09T18:08:18ZGautam VenugopalanBeam size for thermal noise calculationsI was updating the coating optimization codes to conform to the new pygwinc thermal noise syntax. I noticed that `gwinc.noise.coatingthermal.coating_thermooptic` and `gwinc.noise.coatingthermal.coating_brownian` both require `wBeam` as a...I was updating the coating optimization codes to conform to the new pygwinc thermal noise syntax. I noticed that `gwinc.noise.coatingthermal.coating_thermooptic` and `gwinc.noise.coatingthermal.coating_brownian` both require `wBeam` as an input argument - any reason why this isn't just bunched together with the `mirror` Struct?https://git.ligo.org/gwinc/pygwinc/-/issues/85TypeError in coatingthermal with old version of numpy2021-01-05T20:58:42ZJameson Rollinsjameson.rollins@ligo.orgTypeError in coatingthermal with old version of numpy```shell
jameson.rollins@cr70:~ 0$ gwinc Aplus
WARNING: inspiral_range package not available, figure of merit will not be calculated.
Traceback (most recent call last):
File "/bin/gwinc", line 11, in <module>
load_entry_point('gwin...```shell
jameson.rollins@cr70:~ 0$ gwinc Aplus
WARNING: inspiral_range package not available, figure of merit will not be calculated.
Traceback (most recent call last):
File "/bin/gwinc", line 11, in <module>
load_entry_point('gwinc==0.1.1', 'console_scripts', 'gwinc')()
File "/usr/lib/python3.6/site-packages/gwinc/__main__.py", line 233, in main
trace = budget.run(freq=freq)
File "/usr/lib/python3.6/site-packages/gwinc/nb.py", line 282, in run
return self.calc_trace(_precomp=self._precomp)
File "/usr/lib/python3.6/site-packages/gwinc/nb.py", line 543, in calc_trace
_precomp=_precomp,
File "/usr/lib/python3.6/site-packages/gwinc/nb.py", line 514, in calc_noise
_precomp=_precomp,
File "/usr/lib/python3.6/site-packages/gwinc/nb.py", line 240, in calc_trace
total = self._calc(_precomp) * calibration
File "/usr/lib/python3.6/site-packages/gwinc/nb.py", line 127, in _calc
return self.calc(**pcmap)
File "/usr/lib/python3.6/site-packages/gwinc/ifo/noises.py", line 502, in calc
self.freq, ITM, wavelength, cavity.wBeam_ITM
File "/usr/lib/python3.6/site-packages/gwinc/noise/coatingthermal.py", line 137, in coating_brownian
rho, dLogRho_dPhik, dLogRho_dRk, r = getCoatReflAndDer(nN, nsub, dOpt)
File "/usr/lib/python3.6/site-packages/gwinc/noise/coatingthermal.py", line 938, in getCoatReflAndDer
phiNmkm1 = np.flip(Phi) # phi_{N-k-1}
TypeError: flip() missing 1 required positional argument: 'axis'
jameson.rollins@cr70:~ 1$ python3 -c 'import numpy; print(numpy.__version__)'
1.12.1
jameson.rollins@cr70:~/src/pygwinc [master] 0$
```
Apparently the 'axis' argument was required in versions older than 1.15.https://git.ligo.org/gwinc/pygwinc/-/issues/79redshift FOMs in plot title have the wrong units2020-12-16T00:29:33ZChristopher Wipfredshift FOMs in plot title have the wrong unitsThe title string always says Mpc, even when a redshift is returned by the range function.The title string always says Mpc, even when a redshift is returned by the range function.https://git.ligo.org/gwinc/pygwinc/-/issues/51noise sub-budgets2020-11-18T00:30:04ZKevin Kunsnoise sub-budgetsIt would be nice to have sub-budgets for suspension thermal noise showing the vertical and horizontal contributions from each stage. For example, figure 13 from [arXiv:2001.11173](https://arxiv.org/abs/2001.11173).It would be nice to have sub-budgets for suspension thermal noise showing the vertical and horizontal contributions from each stage. For example, figure 13 from [arXiv:2001.11173](https://arxiv.org/abs/2001.11173).Kevin KunsKevin Kunshttps://git.ligo.org/gwinc/pygwinc/-/issues/71parameter redundancy in `ifo.Materials.MirrorMass` and `ifo.Suspension.Stage[...2020-11-17T23:46:25ZJameson Rollinsjameson.rollins@ligo.orgparameter redundancy in `ifo.Materials.MirrorMass` and `ifo.Suspension.Stage[0].Mass`This was first brought up in #3. `ifo.Materials.MirrorMass` is precomp-derived and is only used in [quantum.py](gwinc/noise/quantum.py) and [squeeze.py](gwinc/squeeze.py). Those modules should just be modified to use the suspension adm...This was first brought up in #3. `ifo.Materials.MirrorMass` is precomp-derived and is only used in [quantum.py](gwinc/noise/quantum.py) and [squeeze.py](gwinc/squeeze.py). Those modules should just be modified to use the suspension admittance.https://git.ligo.org/gwinc/pygwinc/-/issues/75Reconsider plot_budget name?2020-11-17T23:00:47ZSebastian SteinlechnerReconsider plot_budget name?Since 51158ce, `plot_noise()` is named `plot_budget()`. May I put forward `plot_traces()`? Reason being that the standard usage is
```python
freq = np.logspace(0,4,3000)
budget = gwinc.load_budget('aLIGO', freq=freq)
traces = budget.run(...Since 51158ce, `plot_noise()` is named `plot_budget()`. May I put forward `plot_traces()`? Reason being that the standard usage is
```python
freq = np.logspace(0,4,3000)
budget = gwinc.load_budget('aLIGO', freq=freq)
traces = budget.run()
fig = gwinc.plot_budget(traces)
```
... and `plot_budget()` would indicate that one should pass the `budget` instance, instead of the (BudgetTrace) instance that results from calling `run()`.https://git.ligo.org/gwinc/pygwinc/-/issues/78BudgetTrace instances are helpless2020-11-17T00:19:45ZChristopher WipfBudgetTrace instances are helpless```
t = gwinc.trace.BudgetTrace()
help(t)
```
results in
```
...
gwinc/trace.py in __getattr__(self, name)
54
55 def __getattr__(self, name):
---> 56 return self._bdict[name]
57
58 def __getitem__(se...```
t = gwinc.trace.BudgetTrace()
help(t)
```
results in
```
...
gwinc/trace.py in __getattr__(self, name)
54
55 def __getattr__(self, name):
---> 56 return self._bdict[name]
57
58 def __getitem__(self, name):
KeyError: '__name__'
```https://git.ligo.org/gwinc/pygwinc/-/issues/28Tagged Releases / version2020-10-27T19:44:03ZRana AdhikariTagged Releases / versionNow that pyGwinc is working, perhaps we should have tagged releases to make available to people. Or some versioning scheme that encodes which ones are stable and which ones are un-tested?Now that pyGwinc is working, perhaps we should have tagged releases to make available to people. Or some versioning scheme that encodes which ones are stable and which ones are un-tested?Jameson Rollinsjameson.rollins@ligo.orgJameson Rollinsjameson.rollins@ligo.org2020-04-24