spacetelescope/mirage

Problem with create_catalog.for_proposal()

Closed this issue · 5 comments

Traceback (most recent call last):
File "/Users/eobardthawne/Desktop/Prof. C.Martin/MIRAGE/GO1635.py", line 62, in
catalog_results = create_catalog.for_proposal(xml_file, pointing_file,
File "/Users/eobardthawne/opt/miniconda3/envs/mirage/lib/python3.9/site-packages/mirage/catalogs/create_catalog.py", line 156, in for_proposal
pointing_dictionary = create_basic_exposure_list(xml_filename, pointing_filename)
File "/Users/eobardthawne/opt/miniconda3/envs/mirage/lib/python3.9/site-packages/mirage/catalogs/create_catalog.py", line 64, in create_basic_exposure_list
info = yaml_generator.SimInput(input_xml=xml_file, pointing_file=pointing_file,
File "/Users/eobardthawne/opt/miniconda3/envs/mirage/lib/python3.9/site-packages/mirage/yaml/yaml_generator.py", line 344, in init
self.apt_xml_dict, self.xml_skipped_observations = get_observation_dict(self.input_xml, self.observation_list_file, catalogs,
File "/Users/eobardthawne/opt/miniconda3/envs/mirage/lib/python3.9/site-packages/mirage/yaml/generate_observationlist.py", line 502, in get_observation_dict
xml_dict = readxml_obj.read_xml(xml_file, verbose=verbose)
File "/Users/eobardthawne/opt/miniconda3/envs/mirage/lib/python3.9/site-packages/mirage/apt/read_apt_xml.py", line 359, in read_xml
exposures_dictionary = self.read_nirspec_mos(template, template_name, obs,
File "/Users/eobardthawne/opt/miniconda3/envs/mirage/lib/python3.9/site-packages/mirage/apt/read_apt_xml.py", line 2324, in read_nirspec_mos
dithertype = template.find(ns + 'DitherType').text
AttributeError: 'NoneType' object has no attribute 'text'

Above is the error reported. When I check the mirage/apt/read_apt_xml.py script, I found that the link assigned to the variable "ns" does not work. I don't know whether it is the reason for this issue.
Thank u!

Thanks for reporting this. It looks like for MOS observations where the Dither Type is set to None in APT, there is no DitherType entry in the xml file. For other instruments it is present but set to None. I'll try to put in a fix this week.

Hi,
Once this problem has been fixed, will I receive a message from you, or do I need to update the Mirage on my computer?

I'll put a message here when the update is complete. You should get an email. Once that is done, you will have to update Mirage on your computer. Sorry I've been slow on this. I've been swamped with high priority work for the last couple weeks.