Git Product home page Git Product logo

Comments (1)

votti avatar votti commented on August 16, 2024
  1. Pretty sure this is an artefact remaining from either a debugging/or variable renaming. This should definitely be removed.
  2. I am not explicitly checking for it and relying on pandas of throwing an error. Definitely not good practice and should be done explicitly.
  3. The logic of the function should be:
If pannelcsv is None:
   returns a .tiff with containing all the channels of the acquisition
   # in this case metalcolumn and massscolumn can be unspecified
else:
   load pannel with filename pannelcsv
   if the pannel has only 1 column:
           # assume the csv is just a list of metal
           return a tiff containing the channels specified in the pannel
           # in this case metalcolumn and massscolumn can be unspecified
  else:
          # asssumes the csv is a table, thus needs a specification
          # which is the  metalcolumn or masscolumn
          if masscolumn is None:
                 # requires that the metalcolumn needs to be specifiec
                return a tiff containing the channels specified in the metalcolumn
          else:
                return a tiff containing the channels specified in the masscolumn

Thus it depends on
a) if pannelcsv is None -> metalcolumn and massscolumn can be None
b) the pannel is a 1 column csv -> metalcolumn and massscolumn can be None
c) the pannel has multiple columns -> either metalcolumn and massscolum need be not None

The code readability and error checks should be definitely improved here.

from imctools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.