diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2016-10-25 20:57:49 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2016-10-25 20:57:49 (GMT) |
commit | d1c4bf158203c4e8ec29fdeb83fd311e36320885 (patch) | |
tree | 15874534e282f67505ce4af5ba805a1ff70ec43e /funtools/fitsy/data | |
parent | e19a18e035dc4d0e8e215f9b452bb9ef6f58b9d7 (diff) | |
parent | 339420dd5dd874c41f6bab5808291fb4036dd022 (diff) | |
download | blt-d1c4bf158203c4e8ec29fdeb83fd311e36320885.zip blt-d1c4bf158203c4e8ec29fdeb83fd311e36320885.tar.gz blt-d1c4bf158203c4e8ec29fdeb83fd311e36320885.tar.bz2 |
Merge commit '339420dd5dd874c41f6bab5808291fb4036dd022' as 'funtools'
Diffstat (limited to 'funtools/fitsy/data')
-rw-r--r-- | funtools/fitsy/data | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/funtools/fitsy/data b/funtools/fitsy/data new file mode 100644 index 0000000..e2b25d6 --- /dev/null +++ b/funtools/fitsy/data @@ -0,0 +1,95 @@ +cardfind.c: if ( fits->index ) card = ft_cardfindidx(fits, key, &match); +cardfind.c: base = fits->index; +cardfind.c: if ( !fits->index ) ft_headindex(fits); +cardfind.c: for ( card = fits->cards; card != &fits->cards[fits->ncard]; card++ ) { +cardins.c: if ( fits->cards == NULL ) return NULL; +cardins.c: if ( fits->index ) Free(fits->index); +cardins.c: if ( fits->ncard+1 > fits->acard ) { +cardins.c: if ( here != NULL ) hereoffset = here - fits->cards; +cardins.c: if ( fits->mem != FT_MALLOC ) return NULL; +cardins.c: fits->acard += FT_CARDS; +cardins.c: fits->data = fits->acard * FT_CARDLEN; +cardins.c: ReAlloc(fits->cards, sizeof(FITSBuff) * fits->acard + 1); +cardins.c: ((char *)fits->cards)[sizeof(FITSBuff) * fits->acard] = '\0'; +cardins.c: if ( here != NULL ) here = fits->cards + hereoffset; +cardins.c: ft_cardclr(&fits->cards[fits->acard-FT_CARDS], FT_CARDS); +cardins.c: if ( here == NULL ) here = &fits->cards[fits->ncard-2]; +cardins.c: , (&fits->cards[fits->ncard-1]-here) * sizeof(FITSBuff)); +cardins.c: fits->ncard++; +cardins.c: Free(fits->index); +cardins.c: fits->ncard--; +headdata.c: return Seek(sfile, fits->data, 0) != -1; +headfile.c: fits->seek = Tell(file); +headfile.c: memmove(fits->cards, card1, n); +headfile.c: if ( Read(file, (void *)&fits->cards[0].c[n], +headfile.c: Free(fits->cards); +headfile.c: if ( (end = ft_cardfindblok(&fits->cards[(nbloks-1) * FT_CARDS] +headfile.c: fits->ncard += FT_CARDS; +headfile.c: ReAlloc(fits->cards, (nbloks+1) * FT_BLOCK + 1); +headfile.c: ((char *)fits->cards)[(nbloks+1) * FT_BLOCK] = '\0'; +headfile.c: ft_cardclr(&fits->cards[nbloks * FT_CARDS], FT_CARDS); +headfile.c: if ( Read(file, (void *)&fits->cards[nbloks * FT_CARDS], +headfile.c: Free(fits->cards); +headfile.c: fits->data = Tell(file); +headfile.c: fits->ncard = end - fits->cards + 1; +headfile.c: fits->acard = nbloks * FT_CARDS; +headfile.c: if ( fits->sync ) ft_synchead(fits); +headfile.c: Write(file, (void *)fits->cards, +headfile.c: FT_BLOCK, ((fits->ncard+FT_CARDS-1)/FT_CARDS)); +headfile.c: return Seek(file, fits->seek, 0) != -1; +headfile.c: sync = fits->sync; +headfile.c: fits->sync = x; +headfind.c: if ( fits->index ) Free(fits->index); +headfind.c: Malloc(fits->index, sizeof(FITSCard *) * fits->ncard); +headfind.c: for ( i = 0; i < fits->ncard; i++ ) { +headfind.c: fits->index[i] = (FITSCard) &fits->cards[i]; +headfind.c: qsort(fits->index, fits->ncard, sizeof(FITSCard *), ft_compare); +headimage.c: if ( fits->basic ) ft_basicfree(fits->basic); +headimage.c: if ( fits->image ) ft_imagefree(fits->image); +headimage.c: if ( fits->table ) ft_tablefree(fits->table); +headimage.c: fits->basic = ft_basicloadhead(fits); +headimage.c: fits->image = ft_imageloadhead(fits); +headimage.c: fits->table = ft_tableloadhead(fits); +headimage.c: if ( fits->basic ) ft_basicstorhead(fits, fits->basic); +headimage.c: if ( fits->image ) ft_imagestorhead(fits, fits->image); +headimage.c: if ( fits->table ) ft_tablestorhead(fits, fits->table); +headimage.c: if ( fits->basic == NULL ) return NULL; +headimage.c: if ( fits->basic->bitpix > 0 ) +headinit.c: fits->mem = FT_MALLOC; +headinit.c: fits->primary = NULL; +headinit.c: fits->rfcount = 1; +headinit.c: fits->cards = fits->last = cards; +headinit.c: fits->acard = fits->ncard = Abs(bytes/FT_CARDLEN); +headinit.c: if ( bytes > 0 ) fits->mem = FT_EXTERN; +headinit.c: fits->ncard = end - fits->cards + 1; +headinit.c: fits->acard = ((fits->ncard+FT_CARDS-1)/FT_CARDS) * FT_CARDS; +headinit.c: fits->data = fits->acard * FT_CARDLEN; +headinit.c: fits->acard = bytes/FT_CARDLEN ? bytes/FT_CARDLEN : FT_CARDS; +headinit.c: (void)Calloc(fits->cards, sizeof(FITSBuff) * fits->acard + 1); +headinit.c: ((char *)fits->cards)[sizeof(FITSBuff) * fits->acard] = '\0'; +headinit.c: ft_cardclr(fits->cards, fits->acard); +headinit.c: fits->ncard = 0; +headinit.c: fits->data = fits->acard * FT_CARDLEN; +headinit.c: fits->index = NULL; +headinit.c: fits->last = fits->cards; +headinit.c: fits->ncard = 1; +headinit.c: ft_cardkey(fits->cards, "END", 0); +headinit.c: fits->sync = 0; +headinit.c: fits->cache = NULL; +headinit.c: if ( fits->primary ) +headinit.c: ft_primlink(fits->primary, head); +headinit.c: memmove(head->cards, fits->cards, head->acard * FT_CARDLEN); +headinit.c: if( head->index && !fits->index ){ +headinit.c: if ( --fits->rfcount ) return; +headinit.c: if ( fits->index ) Free(fits->index); +headinit.c: if ( fits->basic ) ft_basicfree(fits->basic); +headinit.c: if ( fits->image ) ft_imagefree(fits->image); +headinit.c: if ( fits->table ) ft_tablefree(fits->table); +headinit.c: if ( fits->mem == FT_MALLOC && freecards ) Free(fits->cards); +headinit.c: if ( fits->mem == FT_MMAP ) ft_munmap(fits); +headinit.c: if ( fits->mem == FT_SHMAT ) ft_shmdt(fits); +headinit.c: if ( fits->primary ) ft_headfree(fits->primary, 1); +headinit.c: fits->primary = prim; +headinit.c: fits->cards = (FITSCard) cards; +headtable.c: table->col[i-1].width = fits->basic->naxis[0] - table->col[i-1].offset; +headtable.c: ft_basicstorhead(fits, fits->basic); |