I have made good experiences using the one-sided HP filter (
http://ideas.repec.org/c/dge/qmrbcd/181.html).
Also in the case of bringing labor data to your model, be careful as in most dsge models labor is normalized between 0 and 1, whereas in the real world data they are given as total hours worked or something similar. So the best way for labor of bringing model and data together is to use growth rates like; dL = log(L) - log(L(-1)).
Another pitfall is the inflation rate:
When you want to use inflation as your observable variabel then be carefull how you defined inflation in your model: 1. PI = P(+1)/P -1 or 2. just PI = P(+1)/P. If latter is the case then you have to add 1 to the growth rate you have calculated from a GDP deflator (or something similar) using log differences.
To summarize:
1. Save real world data measured in nominal units (like dollar, euro etc.)
2. Price adjuste them by dividing the data by a deflator (GDP deflator for instance)
3. Log the data.
4. Detrend the data by a filter (e.g. one-sided HP filter).
5. Demean the data in case their mean is not zero.
For growth rates:
1. Save real world data like labor hours worked or GDP deflator.
2. Calculated net growth rate with log differences e.g.: dL = log(L) - log(L(-1)).
3. Be carefull if in your model you use gross or net growth rates. If you use gross growth rates then you have to add a 1 to your growth rates calculated in step 2.
(Some hint: I have made good experiences using compute_mode = 10 in the estimation command of dynare).