<commit_before>import os
import time

import specter  #- for throughput, psf
import yaml     #- for desi.yaml
from astropy.io import fits
import numpy as np

from desisim.interpolation import resample_flux

#-------------------------------------------------------------------------
#- Fibermap

def write_fibermap(fibermap, expid, night, dateobs, tileid=None):
    """    
    Writes
        $DESI_SPECTRO_SIM/$PIXPROD/{night}/fibermap-{expid}.fits
       
    Inputs:
      - fibermap : ndarray with named columns of fibermap data
      - expid : exposure ID (integer)
      - night : string YEARMMDD
      - dateobs : time tuple with UTC time; see time.gmtime()
        <commit_msg>fix import bugs<commit_after>import os
import time

import specter.psf
import specter.throughput
import yaml     #- for desi.yaml
from astropy.io import fits
import numpy as np

from desisim.interpolation import resample_flux

#-------------------------------------------------------------------------
#- Fibermap

def write_fibermap(fibermap, expid, night, dateobs, tileid=None):
    """    
    Writes
        $DESI_SPECTRO_SIM/$PIXPROD/{night}/fibermap-{expid}.fits
       
    Inputs:
      - fibermap : ndarray with named columns of fibermap data
      - expid : exposure ID (integer)
      - night : string YEARMMDD
      - dateobs : time tuple with UTC time; see time.gmtime()
        
{'fraction_non_alphanumeric': 0.17950581395348839, 'fraction_numerical': 0.0, 'mean_word_length': 1.948608137044968, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3464541', 'n_tokens_mistral': 416, 'n_tokens_neox': 405, 'n_words': 117}