Refactoring thread

Fair warning: this code is not intended to run just yet. As I was refactoring the functions I realized I had questions for Dan and Co. and decided to put them up on github in order to avoid another long email thread. I'll try to tag people in specific comments to make those salient to relevant folks.


On Thu, 4 Sep 2014, Ilia Kurenkov wrote:

> 
> In translation.py:
> 
> > +    # filing separately gets used a lot down the road
> > +    cd['filing_sep'] = puf_dict['MARS'] == 2
> > +    # this gets used later a lot: check if filing person is dependent (3) or 
> > +    # a widow(er) with a dependent
> > +    cd['depend_or_widow'] = np.logical_or(puf_dict['MARS'] == 3, puf_dict['MARS'
> ] == 6)
> > +    cd['sep'] = np.where(calc_dict['depend_or_widow'], 2, 1)
> > +    cd['txp'] = np.where(np.logical_or(cd['filing_sep'], puf_dict['MARS'] == 5),
> 
> > +                                            2, 1)
> > +    cd['mars-1'] = puf_dict['MARS']-1
> > +    return cd
> > +
> > +
> > +def Adj(cd): 
> > +    #Adjustments
> > +
> > +    e356_e359 = puf_dict['e35600_0'] + puf_dict['e35910_0']
> 
> @feenberg does this have some meaning? Why are we summing up these two variables:
> e35600_0 and 35910_0? What is that meant to represent?

I am very confused by this last statement. Why puf_dict for these 
and not others? Also, e356_e359 doesn't seem to be used anywhere.

e35600_0 and e35910_0 are amounts of foreign income in some particular 
years. When I get to the office I will send you the variables for that 
valid in 2008+. I should have thought about this before - if an income 
item changes its name across years, sometimes I just add up the variables 
instead of having an if statement. Can you send me list of the E-values 
that are used in the program, one per line? I'll check them against the 
SOI docs and tell you which ones are obsolete.

> 
> —
> Reply to this email directly or view it onGitHub.[8114261__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyNTUwNjgwMCwiZ
> GF0YSI6eyJpZCI6NDE2Mjg2NDl9fQ==--99b77b3f31b0ff95a9aa56813ea19bd896203edc.gif]
> 
> 
>