Exemplo n.º 1
0
    # grab the flag from the par_line
    this_trans.flag = trans.par_line[145]

    CaseClass = hitran_meta.get_case_class(this_trans.molec_id,
                                           this_trans.iso_id)
    this_trans.statep = CaseClass(molec_id=this_trans.molec_id,
                                  iso_id=this_trans.iso_id,
                                  E=trans.statep.energy,
                                  g=trans.statep.g,
                                  s_qns=trans.statep.s_qns)
    this_trans.statepp = CaseClass(molec_id=this_trans.molec_id,
                                   iso_id=this_trans.iso_id,
                                   E=trans.statepp.energy,
                                   g=trans.statepp.g,
                                   s_qns=trans.statepp.s_qns)
    this_trans.case_module = hitran_meta.get_case_module(
        this_trans.molec_id, this_trans.iso_id)

    if not this_trans.validate_as_par():
        print this_trans.par_line, '\nfailed to validate! I produced:'
        print this_trans.get_par_str()
        sys.exit(1)
    i += 1
    this_pc = float(i) / ntrans * 100
    if int(this_pc) != last_pc:
        last_pc += 1
        print '%d%%' % last_pc

print ntrans, 'transitions checked out OK!'
Exemplo n.º 2
0
    this_trans.gp = trans.gp
    this_trans.gpp = trans.gpp
    this_trans.multipole = trans.multipole

    # grab the flag from the par_line
    this_trans.flag = trans.par_line[145]

    CaseClass = hitran_meta.get_case_class(this_trans.molec_id,
                                           this_trans.iso_id)
    this_trans.statep = CaseClass(molec_id=this_trans.molec_id,
                iso_id=this_trans.iso_id, E=trans.statep.energy,
                g=trans.statep.g, s_qns=trans.statep.s_qns)
    this_trans.statepp = CaseClass(molec_id=this_trans.molec_id,
                iso_id=this_trans.iso_id, E=trans.statepp.energy,
                g=trans.statepp.g, s_qns=trans.statepp.s_qns)
    this_trans.case_module = hitran_meta.get_case_module(this_trans.molec_id,
                        this_trans.iso_id)

    if not this_trans.validate_as_par():
        print this_trans.par_line,'\nfailed to validate! I produced:'
        print this_trans.get_par_str()
        sys.exit(1)
    i += 1
    this_pc = float(i)/ntrans * 100
    if int(this_pc) != last_pc:
        last_pc += 1
        print '%d%%' % last_pc
                
print ntrans,'transitions checked out OK!'