Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Thomas Robitaille
    @astrofrog
    so e.g.:
    t = Table.read('myfile.fits')
    t.add_row(...)
    t.write('mynewfile.fits')
    Daniel Mendes
    @Danni3l
    Thank you for your help !
    Daniel Mendes
    @Danni3l

    When i try to open the fits file with t = Table.read('myfile.fits') i got an error.*
    My first idea was to open it like:

    inp = fits.open(sample) 
    tbl = inp[1].data
    tbl = Table(ttbl)

    but doing this i also get an error when i use add_row()

    ---------------------------------------------------------------------------
    ValueError                                Traceback (most recent call last)
    C:\Users\daniel\Desktop\specphotoClassif5QGS.py in <module>()
        148     qTbl = Table(qtbl)
        149
    --> 150     mtbl.add_row(gTbl)
        151     mtbl.add_row(qTbl)
        152     '''
    
    C:\Users\daniel\Downloads\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages\astropy\table\table.py in add_row(self, vals, mask)
       2030              3   6   9
       2031         """
    -> 2032         self.insert_row(len(self), vals, mask)
       2033
       2034     def insert_row(self, index, vals=None, mask=None):
    
    C:\Users\daniel\Downloads\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages\astropy\table\table.py in insert_row(self, index, vals, mask)
       2119
       2120             if len(self.columns) != len(vals):
    -> 2121                 raise ValueError('Mismatch between number of vals and columns')
       2122
       2123             if mask is not None:
    
    ValueError: Mismatch between number of vals and columns
    Thomas Robitaille
    @astrofrog
    @bsipocz - based on discussion in the conda-forge gitter channel, I think we might want to pre-emptively fix setuptools to <= 23 for now in ci-helpers, what do you think?
    Brigitta Sipocz
    @bsipocz
    @astrofrog - Sure, I don't recall any package/issue that would need a newer one.
    Brigitta Sipocz
    @bsipocz
    While you're at ci-helpers, could you have a look at astropy/ci-helpers#124 This would avoid duplicate installs of numpy/astropy when we put a version restriction on them.
    Thomas Robitaille
    @astrofrog
    @bsipocz - ok, I guess if no packages have seen that issue maybe we don't need to worry about it. I wonder if maybe it only affects numpy-dev builds (haven't had time to check)
    Will try and check the other issue you mention soon - a bit snowed under this week though!
    Brigitta Sipocz
    @bsipocz
    Well, you saw it, and I guess the only reason other packages didn't is that they don't build against numpy-dev on appveyor. So it's totally fine to add the restriction.
    Thomas Robitaille
    @astrofrog
    @bsipocz - just to check, are you around?
    Brigitta Sipocz
    @bsipocz
    yes, hacking at astrohackweek :)
    Thomas Robitaille
    @astrofrog
    awesome!
    actually I think I figured out the problem (this is a ci-helpers thing, will open issue if I can’t fix it now)
    what are you hacking on?
    Brigitta Sipocz
    @bsipocz
    nothing that works...
    Thomas Robitaille
    @astrofrog
    sounds like a hack day!
    Brigitta Sipocz
    @bsipocz
    well, it was just hopeless for me, but still got 1.5 hours to go, so maybe can fix some jupyter testing issues for someone. For the science hack we hack on some Orion YSOs with pan-starrs and apogee data, but only got to the cross matches, etc.
    What is the issue?
    Thomas Robitaille
    @astrofrog
    Oh I just opened astropy/ci-helpers#131 but I realized it’s not urgent because it’s a use case which is not useful ;)
    I’ve had mixed luck with hack days, half the time I don’t end up getting much done at all, but it’s still fun :)
    Brigitta Sipocz
    @bsipocz
    oh, I think we already have one similar one open. astropy/ci-helpers#84
    Well, I still learnt a lot, and probably next time I should prepare more to bring my own project to hack on.
    Thomas Robitaille
    @astrofrog
    Ok, I closed #131 and added a note to #84
    Brigitta Sipocz
    @bsipocz
    @astrofrog - are you still here?
    Thomas Robitaille
    @astrofrog
    yep!
    Brigitta Sipocz
    @bsipocz
    how long do you think it would take to copy over the .astro hacklist collector and do one from scratch for astrohackweek?
    Thomas Robitaille
    @astrofrog
    well the list itself is pretty easy to set up
    it’s just lots of metadata
    the website generator shouldn’t be too difficult either
    and the heroku submission form, well, it depends - sometimes I have to battle with those things for ages to get them to work...
    Thomas Robitaille
    @astrofrog
    but it would be really cool to re-use it for astrohackweek
    Brigitta Sipocz
    @bsipocz
    although as I see I can't really do it, as there is no license?
    Thomas Robitaille
    @astrofrog
    oops
    er
    let me check
    Brigitta Sipocz
    @bsipocz
    but anyway, I have 30 mins left, so the maximum I can do is make a branch on my fork, and add a hackweek directory ;)
    Thomas Robitaille
    @astrofrog
    ok sounsd good - will open an issue about license
    Thomas Robitaille
    @astrofrog
    @bsipocz - any idea what this is about?
    Ah I konw
    Brigitta Sipocz
    @bsipocz
    @astrofrog - are you around?
    The missing osx astropy+np1.12 bites most packages really badly, but on the other hand I feel that updating numpy stable to be 1.12 a month after the release is expected.
    Should we do a workaround somehow?
    Thomas Robitaille
    @astrofrog
    I'm around sorry
    thinking...
    Brigitta Sipocz
    @bsipocz
    we already have a few workarounds, so I'm ok to add another to make both numpy=stable and astropy=stable happy. This won't solve the problem with other missing dependencies though, but I think it should be delegated back to the packages themselves to deal with (e.g they are pinning pyqt to a version here: https://github.com/astropy/ci-helpers/issues/166#issuecomment-280234536, so then that should be their problem that it's not available on new versions)
    Thomas Robitaille
    @astrofrog
    What about for now if both astropy and numpy are set to stable we set the numpy version to 1.11
    alternatively we could change back to 1.11 and just say we'll update to 1.12 once conda packages with 1.12 are aroujnd