These are chat archives for astropy/astropy

13th
Jun 2017
Aarya Patil
@AustereCuriosity
Jun 13 2017 10:25
I'm currently trying to change the order of the FITS keywords in the header that I am generating for writing tables with Time columns. I realised that the global keywords are set first by BinTableHDU.from_columns() by invoking _TableBaseHDU.init() which eventually calls self._populate_table_keywords(). Here I've made changes:
    def _populate_table_keywords(self):
        """Populate the new table definition keywords from the header."""

        for idx, column in enumerate(self.columns):
            for keyword, attr in six.iteritems(KEYWORD_TO_ATTRIBUTE):
                val = getattr(column, attr)
                if val is not None:
                    keyword = keyword + str(idx + 1)
                    self._header[keyword] = val
            for key in self._header_column.keys():
                if key.endswith(str(idx + 1)):
                    self._header[key] = self._header_column[key]
                    self._header_column.remove(key)
Aarya Patil
@AustereCuriosity
Jun 13 2017 10:37
But now what is happening is that the time keywords which I've stored in self._header_column get written in ascending order of column numbers but the basic TTYPn TFORMn keywords get written at the end of all the time column-specific keywords.
I would like to have:
TTYPE1 = 'a'
TFORM1 = '2D'
TCTYP1 = 'UTC'
TTYPE2 = 'b'
TFORM2 = '2D'
TCTYP2 = 'TT'
Instead I get:
TCTYP1 = 'UTC'
TCTYP2 = 'TT'
TTYPE1 = 'a'
TFORM1 = '2D'
TTYPE2 = 'b'
TFORM2 = '2D'
Aarya Patil
@AustereCuriosity
Jun 13 2017 10:51
@mwcraig Do you have an idea as to why this is happening?
matrixbot
@matrixbot
Jun 13 2017 11:11
bsipocz @austerecuriosity - I'm around in the next few hours, so happy to help to set up travis on your fork
Aarya Patil
@AustereCuriosity
Jun 13 2017 12:19
I'm here
@bsipocz Are you still there?
matrixbot
@matrixbot
Jun 13 2017 12:23
bsipocz hi
bsipocz ok, so first go to https://travis-ci.org/ and sign in using your github account
bsipocz let me know when you're there
Aarya Patil
@AustereCuriosity
Jun 13 2017 12:33
I'm signing in
So I signed in
matrixbot
@matrixbot
Jun 13 2017 12:38
bsipocz i'm in a call now, will be here in 10 mins
Aarya Patil
@AustereCuriosity
Jun 13 2017 12:39
Yeah sure
matrixbot
@matrixbot
Jun 13 2017 12:41
bsipocz ok
bsipocz so right hand corner, click on your name
bsipocz that should bring up a list of your repositories
bsipocz you should be able to find astropy there
bsipocz click on the slider to enable travis on it
Aarya Patil
@AustereCuriosity
Jun 13 2017 12:42
Yeah the checkbox is next to it
matrixbot
@matrixbot
Jun 13 2017 12:42
bsipocz the the cogwheel to see the settings
Aarya Patil
@AustereCuriosity
Jun 13 2017 12:43
Got to the settings
matrixbot
@matrixbot
Jun 13 2017 12:43
bsipocz inside setting you want to have "Build branch updates" on
bsipocz (also having the pull request on can be helpful if someone opens a PR against your fork)
bsipocz basically that's it
Aarya Patil
@AustereCuriosity
Jun 13 2017 12:44
Build branch updates and build pull request updates on
Done
matrixbot
@matrixbot
Jun 13 2017 12:44
bsipocz if you have it on it wil run travis for each and every push you make, so you can play around with it to switch off and on from time to time
bsipocz now you have that WIP pull request open
Aarya Patil
@AustereCuriosity
Jun 13 2017 12:45
YEs
So that's it?
matrixbot
@matrixbot
Jun 13 2017 12:45
bsipocz since we are close to feature freeze and would be nice not to have travis run for it on the astropy repo, I suggest to open a copy branch and do the development there
bsipocz once you're happy with a commit, you can use git cherry-pick <commit-hash> on your original branch of the PR to copy over the changes from the copy branch, and add the [ci skip] to the commit message
Aarya Patil
@AustereCuriosity
Jun 13 2017 12:48
Oh okay got it
Pretty simple :smile:
Thanks
matrixbot
@matrixbot
Jun 13 2017 12:48
bsipocz it sounds a bit messy, but sometimes these workarounds are very useful
Aarya Patil
@AustereCuriosity
Jun 13 2017 12:48
what do you mean by <commit-hash>?
matrixbot
@matrixbot
Jun 13 2017 12:49
bsipocz and also provides much faster testing as you don't need to wait for the whole CI queue
bsipocz ohh, each commit has a hash, I just meant that
Aarya Patil
@AustereCuriosity
Jun 13 2017 12:50
Oh okay. Got it.
matrixbot
@matrixbot
Jun 13 2017 12:50
bsipocz you can see it with git log
bsipocz git cherry-pick is very useful to move commits around between branches.
Aarya Patil
@AustereCuriosity
Jun 13 2017 12:50
So I'll make a copy branch and test that with travis
matrixbot
@matrixbot
Jun 13 2017 12:50
bsipocz thanks
Aarya Patil
@AustereCuriosity
Jun 13 2017 12:51
And then once I'm happy with the work I'll move it to the current PR
matrixbot
@matrixbot
Jun 13 2017 12:51
bsipocz we will be out of freeze soon, so everything can go back to normal after that :)
Aarya Patil
@AustereCuriosity
Jun 13 2017 12:51
What is a feature freeze?
a new feature added in astropy version?
matrixbot
@matrixbot
Jun 13 2017 12:52
bsipocz That's is a deadline for adding new features to the new release.
bsipocz usually means that many people are trying to finish up their work t the same time
Aarya Patil
@AustereCuriosity
Jun 13 2017 12:53
That means too much Travis work
matrixbot
@matrixbot
Jun 13 2017 12:53
bsipocz it's rather fun as there are lots of activity, but it also means that we have a huge traffic jam on CIs that holds back work
bsipocz exactly
Aarya Patil
@AustereCuriosity
Jun 13 2017 12:55
Yes, waiting to see if your build works and after an hour it fails :satisfied:
matrixbot
@matrixbot
Jun 13 2017 12:56
bsipocz e.g. if you go to the contribution graphs, there are those larger peaks with a period of ~half year, those are usually around these dates: https://github.com/astropy/astropy/graphs/contributors
bsipocz yes, your mentors are heavily involved
Aarya Patil
@AustereCuriosity
Jun 13 2017 12:58
That's why even mentors are too busy :tongue: They changed the weekly call schedule due to this I think
Wow, there are some extreme peaks there in those graphs.
Aarya Patil
@AustereCuriosity
Jun 13 2017 17:03
@bsipocz I have a different pull request that I wanted to open. It is related to an issue mentioned earlier in this chat related to Time. I have tested it using travis on my fork. If I open a pull request it will make travis run it again. How do I avoid that?
Aarya Patil
@AustereCuriosity
Jun 13 2017 17:12
Would [skip ci] be fine?
Peter Yoachim
@yoachim
Jun 13 2017 22:01
A crazy WCS question: I have an all sky camera, in theory, the mapping of alt,az to pixels shouldn't change between exposures. Right now I'm using ctype=["RA---AZP-SIP", "DEC--AZP-SIP"] and tricking it by substituting az,alt for ra,dec when I fit the WCS. While it works, it's going to confuse the hell out of anyone else that tries to use my WCS solution. Is there a proper way of saving a WCS in an Alt,Az frame?
matrixbot
@matrixbot
Jun 13 2017 22:18
bsipocz @austerecuriosity - yes, adding [ci skip] to the last commit message should be fine. Unless it's something that should/can go into 2.0, in that case let CI run on it.