<commit_before>from __future__ import print_function
import numpy as np
import apogee.tools.read as apread
from apogee.tools import apStarWavegrid
import apogee.spec.plot as splot
from apogee.spec import continuum
import matplotlib.pyplot as plt
import apogee as apg
from apogee.modelspec import ferre
import csv
'''
This program uses jobovy/apogee to make text files for APOGEE visit spectra and a model spectrum.
The model spectrum should have stellar parameters similar to the target star for use with BF_python.
All the final spectra are continuum normalized.
'''
## define useful variables upfront here so they're easy to change in one place.

KIC = 4851217
#ApogeeID = '2M19432016+3957081'
#plate = locID

locIDs, mjds, fiberIDs = np.loadtxt('data/'+str(KIC)+'/4851217Visitlist'+'.txt', 
    usecols=(2, 3, 4), unpack=True, delimiter=',')

for locID, mjd, fiberID in zip(locIDs, mjds, fiberIDs):

    #Read the (KICnumber)Visitlist.txt and normalize each spectra in it (hopefully)
    #2MassID,PlateID,MJD,Fiber,RA,Dec,ReductionVersion,SN,RV 
    #visitlist = csv.reader(open('data/'+str(KIC)+'/4851217Visitlist'+'.txt','r'))
    #reader = csv.reader(f, delimeter=',')
    
    #header = visitlist.next()
    #column = col(*reader)
    #apogeeID = column[1]
    #locID = column[2]
    #mjd = column[3]<commit_msg>Trying to get python to see values as integers not floats!<commit_after>from __future__ import print_function
import numpy as np
import apogee.tools.read as apread
from apogee.tools import apStarWavegrid
import apogee.spec.plot as splot
from apogee.spec import continuum
import matplotlib.pyplot as plt
import apogee as apg
from apogee.modelspec import ferre
import csv
'''
This program uses jobovy/apogee to make text files for APOGEE visit spectra and a model spectrum.
The model spectrum should have stellar parameters similar to the target star for use with BF_python.
All the final spectra are continuum normalized.
'''
## define useful variables upfront here so they're easy to change in one place.

KIC = 4851217
#ApogeeID = '2M19432016+3957081'
#plate = locID

locIDs, mjds, fiberIDs = np.loadtxt('data/'+str(KIC)+'/4851217Visitlist'+'.txt', 
    usecols=(2, 3, 4), unpack=True, delimiter=',')

#Integers not floats python!
#for int(locID), int(mjd), int(fiberID) in zip(locIDs, mjds, fiberIDs):
for locID, mjd, fiberID in zip(locIDs, mjds, fiberIDs):

    #Read the (KICnumber)Visitlist.txt and normalize each spectra in it (hopefully)
    #2MassID,PlateID,MJD,Fiber,RA,Dec,ReductionVersion,SN,RV 
    #visitlist = csv.reader(open('data/'+str(KIC)+'/4851217Visitlist'+'.txt','r'))
    #reader = csv.reader(f, delimeter=',')
    
    #header = visitlist.next()
    #column = col(*reader)
    #apogeeID = column[1]
    #locID = column[2]
    #mjd = column[3]
{'fraction_non_alphanumeric': 0.10955459770114942, 'fraction_numerical': 0.031609195402298854, 'mean_word_length': 4.838574423480084, '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': '1508454', 'n_tokens_mistral': 1026, 'n_tokens_neox': 931, 'n_words': 299}