Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pygwinc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gwinc
pygwinc
Commits
019ad778
Commit
019ad778
authored
4 years ago
by
Anchal Gupta
Browse files
Options
Downloads
Patches
Plain Diff
Using explicit np.flipud instead of providing axis=0 or relying on default behavior
parent
cb2cefe5
No related branches found
No related tags found
1 merge request
!119
Resolving Issue 85: TypeError in coatingthermal with old version of numpy
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gwinc/noise/coatingthermal.py
+5
-5
5 additions, 5 deletions
gwinc/noise/coatingthermal.py
with
5 additions
and
5 deletions
gwinc/noise/coatingthermal.py
+
5
−
5
View file @
019ad778
...
...
@@ -935,8 +935,8 @@ def getCoatReflAndDer(nN, nsub, dOpt):
# rhoN[0] is total complex reflectivity of the coating stack.
rhoN
=
np
.
zeros_like
(
Refl
,
np
.
complex128
)
phiNmkm1
=
np
.
flip
(
Phi
)
# phi_{N-k-1}
rNmkm1
=
np
.
flip
(
Refl
[:
-
1
])
# r_{N-k-1}
phiNmkm1
=
np
.
flip
ud
(
Phi
)
# phi_{N-k-1}
rNmkm1
=
np
.
flip
ud
(
Refl
[:
-
1
])
# r_{N-k-1}
exp2iphiNmkm1
=
np
.
exp
(
2j
*
phiNmkm1
)
# exp(2i phi_{N-k-1})
# Recursion relation for complex reflectivity
...
...
@@ -955,11 +955,11 @@ def getCoatReflAndDer(nN, nsub, dOpt):
delRhokp1_delPhiNmkm1
=
np
.
append
(
0
,
-
2j
*
rhoN
[:
-
1
]
*
delRhokp1_delRhok
)
# Derivative of rho_{N} wrt to rho_{N-j}
delRhoN_delRhoNmj
=
np
.
append
(
1
,
np
.
cumprod
(
np
.
flip
(
delRhokp1_delRhok
)))
delRhoN_delRhoNmj
=
np
.
append
(
1
,
np
.
cumprod
(
np
.
flip
ud
(
delRhokp1_delRhok
)))
# Derivative of rho_{N} wrt to r_k and phi_k
delRho_delRk
=
-
delRhoN_delRhoNmj
*
np
.
flip
(
delRhokp1_delRNmkm1
)
delRho_delPhik
=
-
delRhoN_delRhoNmj
*
np
.
flip
(
delRhokp1_delPhiNmkm1
)
delRho_delRk
=
-
delRhoN_delRhoNmj
*
np
.
flip
ud
(
delRhokp1_delRNmkm1
)
delRho_delPhik
=
-
delRhoN_delRhoNmj
*
np
.
flip
ud
(
delRhokp1_delPhiNmkm1
)
delLogRho_delReflk
=
delRho_delRk
/
rhoN
[
-
1
]
delLogRho_delPhik
=
delRho_delPhik
/
rhoN
[
-
1
]
delLogRho_delPhik
[
-
1
]
=
0
# Define this as per Eq (26)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment