def convert_longitude_from_TES_to_MOLA(data, nlines_read):
    """This function convert the longitude form IAU1990 to IAU2000 
    by subtracting 0.271 degrees from the west longitude stored, and converts
    the longitude to from west longitude to east longitude [-180,180)"""
    if 'longitude' in data:
        west_longitude_tes = data['longitude']['array']
        east_longitude_mola = 360.0 - west_longitude_tes + 0.271
        east_longitude_mola = east_longitude_mola % 360.0
        filter180 = east_longitude_mola > 180
        east_longitude_mola[filter180] = east_longitude_mola[filter180] - 360.0
    elif 'longitude_iau2000' in data:
        east_longitude_mola = data['longitude_iau2000']['array']
        data['longitude'] = data['longitude_iau2000']
        data['longitude']['array'] = east_longitude_mola
    return data, nlines_read
