{"action":"created","issue":{"url":"https://api.github.com/repos/nom-tam-fits/nom-tam-fits/issues/46","labels_url":"https://api.github.com/repos/nom-tam-fits/nom-tam-fits/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/nom-tam-fits/nom-tam-fits/issues/46/comments","events_url":"https://api.github.com/repos/nom-tam-fits/nom-tam-fits/issues/46/events","html_url":"https://github.com/nom-tam-fits/nom-tam-fits/issues/46","id":101082295,"number":46,"title":"Header.rewite() failure with long strings","user":{"login":"nasamaher","id":1706941,"avatar_url":"https://avatars.githubusercontent.com/u/1706941?v=3","gravatar_id":"","url":"https://api.github.com/users/nasamaher","html_url":"https://github.com/nasamaher","followers_url":"https://api.github.com/users/nasamaher/followers","following_url":"https://api.github.com/users/nasamaher/following{/other_user}","gists_url":"https://api.github.com/users/nasamaher/gists{/gist_id}","starred_url":"https://api.github.com/users/nasamaher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nasamaher/subscriptions","organizations_url":"https://api.github.com/users/nasamaher/orgs","repos_url":"https://api.github.com/users/nasamaher/repos","events_url":"https://api.github.com/users/nasamaher/events{/privacy}","received_events_url":"https://api.github.com/users/nasamaher/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nom-tam-fits/nom-tam-fits/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"ritchieGitHub","id":9456779,"avatar_url":"https://avatars.githubusercontent.com/u/9456779?v=3","gravatar_id":"","url":"https://api.github.com/users/ritchieGitHub","html_url":"https://github.com/ritchieGitHub","followers_url":"https://api.github.com/users/ritchieGitHub/followers","following_url":"https://api.github.com/users/ritchieGitHub/following{/other_user}","gists_url":"https://api.github.com/users/ritchieGitHub/gists{/gist_id}","starred_url":"https://api.github.com/users/ritchieGitHub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ritchieGitHub/subscriptions","organizations_url":"https://api.github.com/users/ritchieGitHub/orgs","repos_url":"https://api.github.com/users/ritchieGitHub/repos","events_url":"https://api.github.com/users/ritchieGitHub/events{/privacy}","received_events_url":"https://api.github.com/users/ritchieGitHub/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/nom-tam-fits/nom-tam-fits/milestones/4","html_url":"https://github.com/nom-tam-fits/nom-tam-fits/milestones/1.13.1","labels_url":"https://api.github.com/repos/nom-tam-fits/nom-tam-fits/milestones/4/labels","id":1254680,"number":4,"title":"1.13.1","description":"bugfix release","creator":{"login":"ritchieGitHub","id":9456779,"avatar_url":"https://avatars.githubusercontent.com/u/9456779?v=3","gravatar_id":"","url":"https://api.github.com/users/ritchieGitHub","html_url":"https://github.com/ritchieGitHub","followers_url":"https://api.github.com/users/ritchieGitHub/followers","following_url":"https://api.github.com/users/ritchieGitHub/following{/other_user}","gists_url":"https://api.github.com/users/ritchieGitHub/gists{/gist_id}","starred_url":"https://api.github.com/users/ritchieGitHub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ritchieGitHub/subscriptions","organizations_url":"https://api.github.com/users/ritchieGitHub/orgs","repos_url":"https://api.github.com/users/ritchieGitHub/repos","events_url":"https://api.github.com/users/ritchieGitHub/events{/privacy}","received_events_url":"https://api.github.com/users/ritchieGitHub/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2015-08-14T05:00:23Z","updated_at":"2015-08-16T17:28:16Z","due_on":"2015-08-21T22:00:00Z","closed_at":null},"comments":5,"created_at":"2015-08-14T19:06:31Z","updated_at":"2015-08-17T13:14:50Z","closed_at":"2015-08-16T07:44:06Z","body":"Using git HEAD from 8/14/15 (with long strings and HIERACH fix), I moved forward with my development.  I stumbled on a problem when using long strings in combination with HIERARCH.  After reading a nom-tam-fits generated FITS file with a certain combination of long strings & HIERARCH - and without changing anything in the header - I can't rewrite() the header.  It seems that in this situation that Header.rewritable() thinks that getNumberOfPhysicalCards() differs significantly from this.originalCardCount.   The following code fails with this file:\r\n\r\n```java\r\n\t\tFitsFactory.setUseHierarch(true);\r\n\t\tFitsFactory.setLongStringsEnabled(true);\r\n\r\n\t\tString filename = \"test.fits\";\r\n\t\tHeader headerRewriter = new Fits(filename).getHDU(0).getHeader();\r\n\t\theaderRewriter.rewrite();\r\n```\r\n\r\nSince I can't attach the file  (\"test.fits\" here, I have put it on a public drive:\r\n\r\nhttps://opendrive.gsfc.nasa.gov/longauth/x/FmcJXoC \r\n\r\nSteve"},"comment":{"url":"https://api.github.com/repos/nom-tam-fits/nom-tam-fits/issues/comments/131814501","html_url":"https://github.com/nom-tam-fits/nom-tam-fits/issues/46#issuecomment-131814501","issue_url":"https://api.github.com/repos/nom-tam-fits/nom-tam-fits/issues/46","id":131814501,"user":{"login":"nasamaher","id":1706941,"avatar_url":"https://avatars.githubusercontent.com/u/1706941?v=3","gravatar_id":"","url":"https://api.github.com/users/nasamaher","html_url":"https://github.com/nasamaher","followers_url":"https://api.github.com/users/nasamaher/followers","following_url":"https://api.github.com/users/nasamaher/following{/other_user}","gists_url":"https://api.github.com/users/nasamaher/gists{/gist_id}","starred_url":"https://api.github.com/users/nasamaher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nasamaher/subscriptions","organizations_url":"https://api.github.com/users/nasamaher/orgs","repos_url":"https://api.github.com/users/nasamaher/repos","events_url":"https://api.github.com/users/nasamaher/events{/privacy}","received_events_url":"https://api.github.com/users/nasamaher/received_events","type":"User","site_admin":false},"created_at":"2015-08-17T13:14:50Z","updated_at":"2015-08-17T13:14:50Z","body":"I've realized that creating a header with dummy data will still not work as any significant size deviation from the dummy data will make a header non-rewriteable.  So now I am adding a \"Padding\" keyword with enough size so that I can remove (or add) to it to keep the header size within the 35? card size (i.e., keep it rewritable)"}}