Skip to content

CObs format added and complex Corr print improved. #200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

fjosw
Copy link
Owner

@fjosw fjosw commented Jul 13, 2023

I worked a bit on the string conversion of complex observables and correlators.

  • CObs now have a __format__ method which allows for f-string formatting like this:
print(f"{my_cobs:+3}")
> (+0.018(465)+0.443(393)j)
  • I use this to also improve the print output of complex correlators which now produces the following:
Corr T=4 N=1
x0/a	Corr(x0/a)
------------------
0	(+0.02(46)+0.44(39)j)
1	(+0.00(59)+0.43(37)j)
2	(+0.01(58)+0.64(47)j)
3	(-0.03(62)+0.45(51)j)

Please have a look @JanNeuendorf

PS: There is still no proper print output for matrix correlators.

@fjosw fjosw requested a review from s-kuberski July 13, 2023 17:15
Copy link
Collaborator

@s-kuberski s-kuberski left a comment

Choose a reason for hiding this comment

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

Looks good!

@fjosw fjosw merged commit 8736d1c into develop Jul 14, 2023
@fjosw fjosw deleted the feat/better_corr_print branch July 14, 2023 12:38
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.

2 participants