GithubHelp home page GithubHelp logo

Comments (11)

stuartcampbell avatar stuartcampbell commented on September 17, 2024

@licode Can you have a look into this ?

from csxtools.

licode avatar licode commented on September 17, 2024

sure, I am on this.

from csxtools.

licode avatar licode commented on September 17, 2024

I think this should work

slicerator = get_fastccd_images(db[old_scan_no], (db[old_scan_no-1,old_scan_no+1]))

(db[old_scan_no-1,old_scan_no+1], None, None) is not 1d tuple.

from csxtools.

mpmdean avatar mpmdean commented on September 17, 2024

Since the notebook server is down, I can't check, but from inspecting the code isn't the problem that the code assumes that the first element of the tuple is a header object?

When called in either of our examples it tried to access {1st element of tuple}.table()

db[old_scan_no-1,old_scan_no+1] returns a list and the code fails because it tries to access the .table() method on this list?

from csxtools.

licode avatar licode commented on September 17, 2024

yep. This is exactly what error complains about.

AttributeError: 'list' object has no attribute 'db'

from csxtools.

mpmdean avatar mpmdean commented on September 17, 2024

I think we're in agreement. The code was changed from using the get_table function imported at the start of the module to access the same functionality via the .table() attribute of the input object.

Maybe there are some speed or other reasons for this? If not, my instinct would be to put it back as it was?

from csxtools.

licode avatar licode commented on September 17, 2024

This is the feature provided in new databroker. We will use header.db.get_images, header.db.get_table, instead of importing at the beginning. The reason is we will have multiple db later, i.e., different db links to different mongo back end. hdr.db provides an easy way to sort out this requirements.

Here is the new doc. http://nsls-ii.github.io/databroker/tutorial.html

from csxtools.

mpmdean avatar mpmdean commented on September 17, 2024

That sounds like a reasonable way to do it. So should the CSX tool fix would be some try: except: ArributeError blocks to handle either a single dark image or multiple dark images? This functionality was previously in the imported function.

from csxtools.

licode avatar licode commented on September 17, 2024

sounds good. hdr.db.get_images should work with multiple headers, because nothing changed in db.get_images, we just linked it back to hdr. We only need a quick fix in csxtools. I am working a PR on this.

from csxtools.

licode avatar licode commented on September 17, 2024

This should be fixed on
#61

from csxtools.

ambarb avatar ambarb commented on September 17, 2024

Tested
/opt/conda_envs/analysis-2018-2.1)
csxtools: '0.1.13'

tested before debian 7 upgrade to 8 and it still seemed problematic.

tested this week after debian upgrade to 8 on all 3 servers and not this functionality appears to work without issue.

from csxtools.

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.