I think Bill has provided very useful information to solve your problem. Following his suggestion, to achieve what you asked, WaveletThreshold looks like the function to do the task.
However, your question of keeping 1/2 largest is not clear to me at what indices and how to compute the threshold. Do you only want to threshold on all indices or detail ones? Is 1/2 largest meaning over all indices or just detail ones?
Once you have computed the threshold with the information Bill has provided, WaveletThreshold allows you to specify which index to perform the thresholding.
WaveletThreshold[ dwd, {"Hard", threshold}, indice]
For example, this code thresholds all indices:
SeedRandom[1];data = RandomReal[{-1, 1}, {8}];
dwd = DiscreteWaveletTransform[data];
Normal@WaveletThreshold[dwd, {"Hard", Median[Abs@Flatten[Last /@ Normal[dwd]]]}, All]
returns
{{0} -> {0., 0., -0.979909, 0.}, {1} -> {0.998392, 0.850965, 0.,
0.}, {0, 0} -> {0., -0.919499}, {0, 1} -> {0., -0.466301}, {0, 0,
0} -> {-0.716554}, {0, 0, 1} -> {0.583814}}