Skip to content
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

sinogeom :moj plot #64

Merged
merged 5 commits into from
Jul 23, 2020
Merged

sinogeom :moj plot #64

merged 5 commits into from
Jul 23, 2020

Conversation

JeffFessler
Copy link
Owner

and code formatting...


return format, endian, bytes
dict = Dict([
Copy link
Contributor

@johnnychen94 johnnychen94 Jul 22, 2020

Choose a reason for hiding this comment

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

Compared to the current implementation, Using Dict might be bad in performance because Dict is mutable.

# after
julia> @btime datatype_fld_to_mat("byte")
  1.822 μs (60 allocations: 3.81 KiB)
(UInt8, :be, 1)

# Before
julia> @btime datatype_fld_to_mat("byte")
  50.033 ns (1 allocation: 32 bytes)
(UInt8, "ieee-be", 1)

Copy link
Owner Author

Choose a reason for hiding this comment

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

Thanks very much for the info! Then I will avoid using Dict in performance critical places. Here it is just some IO for an obscure file type used rarely so I think this version is easier to read.
I'm mostly working to improve code coverage at the moment...

Copy link
Owner Author

Choose a reason for hiding this comment

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

BTW, is there a const variant that would be better to use? I couldn't find one...

Copy link
Contributor

Choose a reason for hiding this comment

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

BTW, is there a const variant that would be better to use? I couldn't find one...

I don't know much about it, but I guess NamedTuple might work

Copy link
Owner Author

Choose a reason for hiding this comment

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

Thanks - good idea. Unfortunately the keys have - in the string so it would be some work. Maybe later...

@codecov
Copy link

codecov bot commented Jul 23, 2020

Codecov Report

Merging #64 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #64   +/-   ##
=======================================
  Coverage   99.62%   99.62%           
=======================================
  Files          48       48           
  Lines        2120     2124    +4     
=======================================
+ Hits         2112     2116    +4     
  Misses          8        8           
Impacted Files Coverage Δ
src/io/fld-read.jl 97.82% <ø> (ø)
src/fbp/sino_geom.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e896ad5...dbc50eb. Read the comment docs.

@JeffFessler
Copy link
Owner Author

I got accidentally got two branches mixed up but in the end this merge should just be sino_geom related.

@JeffFessler JeffFessler merged commit d143d07 into master Jul 23, 2020
@JeffFessler JeffFessler deleted the sinogeom branch July 23, 2020 16:27
@johnnychen94
Copy link
Contributor

johnnychen94 commented Jul 23, 2020

Yes, this is because you created this branch on the top of fldtest branch (#63) instead of master branch.

FYI, before #63 is merged, you can use git rebase master in sinogeom branch to not include those new commits in fldtest.

Anyway, merge with squash always help fix this kind of issue :P another advantage of PR-and-merge routine 😄

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.

None yet

2 participants