Skip to content

Ch/kltransform fsorder - #102

Draft
cahofer wants to merge 6 commits into
mainfrom
ch/kltransform-fsorder
Draft

Ch/kltransform fsorder#102
cahofer wants to merge 6 commits into
mainfrom
ch/kltransform-fsorder

Conversation

@cahofer

@cahofer cahofer commented Feb 1, 2021

Copy link
Copy Markdown

Allow F/S diagonalisation order in kltransform.KLTransform

  • feat(kltransform.KLtrasnform): S/F or F/S diagonalisation order for the first eigenvalue decomposition in the class KLtransform can be configured over the 'diagonalisation_order' config property. Accordingly, either high S/F and low F/S eigenvalues are selected.

Carolin Hofer added 2 commits February 1, 2021 11:34
(cherry picked from commit 3af5152218f19c271b0e26d7e1d8e6523f6f8772)
@cahofer
cahofer requested review from jrs65 and sjforeman February 1, 2021 20:05
@lgtm-com

lgtm-com Bot commented Feb 1, 2021

Copy link
Copy Markdown

This pull request introduces 1 alert when merging de682ea into 94f0ece - view on LGTM.com

new alerts:

  • 1 for Unused local variable

@lgtm-com

lgtm-com Bot commented Feb 2, 2021

Copy link
Copy Markdown

This pull request introduces 1 alert when merging b7733b1 into 94f0ece - view on LGTM.com

new alerts:

  • 1 for Unused local variable

@sjforeman sjforeman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a few minor things to look at...

Comment thread drift/core/doublekl.py
ind = np.where(evals < self.foreground_threshold)

# Construct evextra dictionary (holding foreground ratio)
evextra = {"ac": ac, "f_evals": evals.copy()}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we consider using sf_evals for S/F transform and fs_evals for F/S transform, to make it more explicit which eigenvalues are being stored?

Comment thread drift/core/doublekl.py Outdated
if self.diagonalisation_order == "sf":
f_evals = evextra["f_evals"]
else:
f_evals = evextra["f_evals"][::-1]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you reverse the order for F/S eigenvalues? To be consistent with the single-KL F/S case, shouldn't the order be left as it is?

Comment thread drift/core/kltransform.py
@cahofer

cahofer commented Mar 28, 2021

Copy link
Copy Markdown
Author

Hey @sjforeman , I addressed your requests, the issue right now is that when simulating a pathfinder sized telescope the transform is not able to complete in the S/N step (matrix not positive definite). So this probably requires more research time before a final merge.

Comment thread drift/core/doublekl.py Outdated
else:
f_evals = evextra["f_evals"]

f.create_dataset("f_evals", data=f_evals)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if-else doesn't do anything...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ja missed that one.. thanks.

@sjforeman

Copy link
Copy Markdown
Contributor

Hey @sjforeman , I addressed your requests, the issue right now is that when simulating a pathfinder sized telescope the transform is not able to complete in the S/N step (matrix not positive definite). So this probably requires more research time before a final merge.

Let's try it again after the new cedar CHIME environment is ready. I think pathfinder-sized telescopes were working fine for me, but I manually upgraded the version of scipy in my virtualenv. The new standard environment should have newer packages, so maybe that will solve your matrix issue.

@cahofer

cahofer commented Mar 28, 2021

Copy link
Copy Markdown
Author

Alright sounds good!

@jrs65

jrs65 commented May 18, 2021

Copy link
Copy Markdown
Contributor

@cahofer I wrote down on Friday that you were going to run a quick test against the new CHIME env. Let us know when you get around to that one, but I don't think it's a rush.

@jrs65

jrs65 commented Jun 2, 2021

Copy link
Copy Markdown
Contributor

I'm going to convert this one to a draft until it's closer to be ready to merge.

@jrs65
jrs65 marked this pull request as draft June 2, 2021 00:52
@jrs65

jrs65 commented Jun 14, 2021

Copy link
Copy Markdown
Contributor

@cahofer Just wanted to follow up on this one. Did you manage to get any tests running through?

@cahofer

cahofer commented Jun 15, 2021

Copy link
Copy Markdown
Author

uuuggh I am pushing through the very lasts bits of my thesis I will put this on hold until after the thesis is submitted! sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants