TomographicImaging / CIL

A versatile python framework for tomographic imaging
https://tomographicimaging.github.io/CIL/
Apache License 2.0
97 stars 45 forks source link

number of something should be named num_something in the code #699

Open paskino opened 4 years ago

paskino commented 4 years ago

In TotalVariation the number of internal iteration is called iterations, but should be num_iterations

gfardell commented 4 years ago

This is elsewhere too. ImageGeometry springs to mind.

jakobsj commented 4 years ago

I see the point but don't see that numiterations etc is necessarily better. One then needs to remember whether it is num, number_, numberof, NumIterations, or some other variant. "iterations" is at least short and without that ambiguity. On a balance I think I prefer the present version with just "iterations". For example writing iterations=100 seems pretty clear to me.

On Fri, 6 Nov 2020 at 17:04, Gemma Fardell notifications@github.com wrote:

This is elsewhere too. ImageGeometry springs to mind.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vais-ral/CCPi-Framework/issues/699#issuecomment-723160011, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACMDSCAZ4MZ2U4E6CCIFWUTSOQNCBANCNFSM4TMPA3VA .

epapoutsellis commented 4 years ago

To me num_iterations is pleonasm. Iterations is a very clear word.

paskino commented 4 years ago

I think we agreed to adhere to SIRF's coding conventions.

Variables, methods and members: lower case, with underscores between each word, for example set_bin_efficiency. . Variable for a number of something: num_var . Number of an item in a sequence: var_num *. Pointers, shared pointers and auto pointers should have the respective suffixes: ptr, sptr and aptr.

Unfortunately, all the code doesn't respect this, yet. For relatively new code as TotalVariation it'd be nice if it adhered to the standard.

paskino commented 4 years ago

let's put it in the documentation and developer's guide and use num_iter and iter_num

paskino commented 4 years ago

Algorithm needs some updating.

paskino commented 2 years ago

Add to user guide