Commit 324d236f authored by Vigeesh Gangadharan's avatar Vigeesh Gangadharan
Browse files

add fits card group test

parent aeda53ce
Pipeline #3554 passed with stage
in 3 minutes and 2 seconds
from grisinv import vfisv import pytest
\ No newline at end of file
def test_fitscardgroup():
import os
import pkgutil
from astropy.io import fits
from grisinv import FitsCardGroup
hdr = fits.Header()
keywordlist = (
pkgutil.get_data("grisinv", os.path.join("data_files", "header_list.csv"))
.decode()
.split("\n")
)
for ikeywords in keywordlist:
hsection = ikeywords.split(",")[0]
sec_keywords = ikeywords.split(",")[1:]
sect_card = FitsCardGroup(title=hsection, cardlist=sec_keywords)
hdr.extend(sect_card.to_header(), end=True)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment