Skip to content

Using the tutorial example to analyze the nicer data, an error occurs, #3

Description

@py3u

Hello, I am trying to use the tutorial example and pyxspec, heasoftpy to analyze nicer data, and an error occurs,
detailed code:

# get the on-axis rmf
res = hsp.quzcif(mission='nicer', instrument='xti',detector='-',
             filter='-', date='-', time='-',expr='-',codename='MATRIX')
rmf = [x.split()[0] for x in res.output if 'nixtiref'  in x][0]

# get the on-axis arf
res = hsp.quzcif(mission='nicer', instrument='xti',detector='-',
             filter='-', date='-', time='-',expr='-',codename='SPECRESP')
arf = [x.split()[0] for x in res.output if 'nixtiaveonaxis'  in x][0]


IndexError Traceback (most recent call last)
Cell In[7], line 4
1 # get the on-axis rmf
2 res = hsp.quzcif(mission='nicer', instrument='xti',detector='-',
3 filter='-', date='-', time='-',expr='-',codename='MATRIX')
----> 4 rmf = [x.split()[0] for x in res.output if 'nixtiref' in x][0]
6 # get the on-axis arf
7 res = hsp.quzcif(mission='nicer', instrument='xti',detector='-',
8 filter='-', date='-', time='-',expr='-',codename='SPECRESP')

IndexError: list index out of range

Note:
heasoftpy 1.2.1 pypi_0 pypi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions